SlideShare a Scribd company logo
Introduction
to

Java
ā€¢ Today Java , is one of the most popular programming
language which is used in critical applications likeā€¦

ļ± web based applications
ļ±Embedded applications
ļ± android mobile application.

Introduction
ā€¢ Lets have a look in history of Javaā€¦
ā€¢ Java was developed by James Gosling from Sun Microsystems in 1995.
ā€¢ Introduced as an object-oriented language for general-purpose business
applications and for interactive, Web-based Internet applications.
ā€¢ The goal was to provide platform-independent alternative to C++. In other
terms it is architecturally neutral, which means that you can use Java to
write a program that will run on any platform or device.
ā€¢ Instead, Java runs on a Java Virtual Machine (JVM).

History & Evolution
ā€¢ James Gosling ,Mike Sheridan and Patrick Naughton initiated the
green project in June 1991.
ā€¢ Originally designed for small , embedded systems in electronic
appliances like set-top boxes.
ā€¢ It was initially called as Oak and later on renamed as ā€œJavaā€ in 1995.
ā€¢ Originally developed by James Gosling at Sun Microsystems in
1995.
ā€¢ JDK 1.0 released in 1996.

History and Evolution
History of Java Releases
Java Version/Code Name

Release Date

Important Features/Code Name

JDK 1.0 (Oak)

23rd Jan 1996

Initial release

JDK 1.1

19th Feb 1997

Reflection , JDBC , Inner Classes
,RMI

J2SE 1.2 (Playground)

8th Dec 1998

Collection , JIT, String memory map

J2SE 1.3 (Kestrel)

8th May 2000

Java Sound , Java Indexing ,JNDI

J2SE 1.4 (Merlin)

6th Feb 2002

Assert , regex, exception chaining

J2SE 5.0 (Tiger)

30th Sept 2004

Generics ,autoboxing ,enums

Java SE 6.0 (Mustang)

11th Dec 2006

JDBC 4.0 , Java compiler API ,
Annotations

Java SE 7.0 (Dolphin)

28th July 2011

String in switch case ,exception
handling new way
Simple:
A Java programmer does not need to know the internal
functioning of Java, such as how memory is allocated to data.
Object-oriented:
Java supports the object-oriented approach to develop
programs.
Compiled and interpreted:
The Java programs are first compiled and then interpreted.
After the program is compiled, it is converted to a bytecode.
The Java Virtual Machine (JVM) then interprets this bytecode
into the computer code and runs it.
Portable:
Refers to the ability of a program to run on any platform without
changing the source code of a program.

Features of Java Environment
ā€¢

The following figure shows how the Java bytecode and the JVM together
make Java programs portable on different platforms.

Features of Java Environment
Distributed:
Java is designed for the distributed environment of the Internet
because it supports the various Internet protocols, such as
Transmission Control Protocols and Internet Protocol (TCP/IP).
Secure:
Java has built-in security features that verify that the programs
do not perform any destructive task, such as accessing the
files on a remote system.

Features of Java
Environment
ā€¢ Java technology provides language part along with architecture for
running applications.
ā€¢ Java Architecture provides
ā€¢ Portable
ā€¢ high-performance
ā€¢ robust runtime environment.

ā€¢ Various Components of Java Architecture are :
ā€¢ Java Programming Language and class file
ā€¢ JVM
ā€¢ Java Application Programming Interface (API)

Java Architecture
ā€¢ Java Runtime Environment contains JVM, class libraries and
other supporting components.
ā€¢ Java source code is compiled into bytecode by Java compiler.
ā€¢ This bytecode will be stored in class files.
ā€¢ During runtime, this bytecode will be loaded, verified
and JVM interprets the bytecode into machine code which
will be executed in the machine in which the Java program
runs.

Java Runtime Environment (JRE)
ā€¢ A Java Runtime Environment performs the following main
tasks respectively.
ā€¢ Loads the class
ā€¢ This is done by the class loader

ā€¢ Verifies the bytecode
ā€¢ This is done by bytecode verifier.

ā€¢ Interprets the bytecode
ā€¢ This is done by the JVM

Java Runtime Environment (JRE)
ā€¢ Java programming language and class file:
ā€¢ Java programs are saved with an extension, .java.
ā€¢ A .java file is compiled to generate the .class file, which contains the
byte code.
ā€¢ The JVM converts the byte code contained in the .class file to machine
object code.
ā€¢ The JVM needs to be implemented for each platform running on a
different operating system.

Java Programming Lang. & Class file
ā€¢ Its an abstract Machine forms the base of Java Platform.
ā€¢ Specification that provides runtime environment in which java byte code
can be executed.
ā€¢ Available for many hardware and software.

ā€¢ JVM performs:
ā€¢
ā€¢
ā€¢
ā€¢

Loads code
Verifies code
Executes code
Provide Runtime Environment

Java Virtual Machine (JVM)
ā€¢ Major Components of JVM
ā€¢ Class Loader
ā€¢ Byte code Verifier
ā€¢ Just In Time (JIT) compiler

Java Virtual Machine
Interpreter
Byte
Code

Class
Loader

Byte code
Verifier

JIT Compiler

Java Runtime Environment

Java Virtual Machine

Running
Program
ā€¢ Class Loader
ā€¢ Class loader loads all the class files required to execute the
program.

ā€¢ Byte code Verifier
ā€¢
ā€¢
ā€¢
ā€¢

Checks that code follows JVM specifications.
There is no unauthorized access to memory.
The code does not cause any stack overflows.
There are no illegal data conversions in the code such as float to
object references.

Components of JVM
ā€¢ JIT Compiler
ā€¢ Used to improve performance.
ā€¢ It translates byte code only the first time.
ā€¢ If repeated execution of code is required , it is automatically
mapped to the corresponding native machine code.
ā€¢ JIT make use of the machine code which is cached and stored.

Components of JVM
Java Development Kit

ā€¢ Package that provides the basic functionality of Java Language.
ā€¢ Contains series of classes and methods

ā€¢ Tools used to develop and execute java programs is known as JDK.
ā€¢ It contains
ā€¢
ā€¢
ā€¢
ā€¢

Basic Tools( javac,java,javap,javadoc,appletviewer etc)
RMI tools (rmic,rmiregistry,rmid)
Security Tools (keytools,policytool etc.)
Java plug-in Tools
Basic Tools

Description

Javac

Compiler for java language

Java

Launcher of java application

Javadoc

API documentation generator

Appletviewer

Run and debug applets without a web
browser

Jar

Manage java archive files

Javap

Class file dissassembler

Java Development Kit
The Java API is a collection of software components that provide
capabilities, such as GUI.
The related classes and interfaces of the Java API are grouped
into packages.
The following figure shows how the Java API and the JVM forms
the platform for the Java programs on top of the hardware.

Java API
ā€¢ Java can be used to develop more dynamic programs.
ā€¢ Leading programming language for wireless technology and real time
embedded programming for cell phones.
ā€¢ Major Categories of java programs :
ā€¢ Applets
ā€¢ Applications

Type of Java Programs
ā€¢ Applets
ā€¢ Small program embedded in a web page.
ā€¢ Applets are downloaded over network and can make network
connections only to the host they are issued from.
ā€¢ Graphical in nature and tends to contain controls like text field
, button label etc.

ā€¢ Applications
ā€¢
ā€¢
ā€¢
ā€¢

Standalone programs written in java.
Invoked by using a JVM.
Can access the local file system.
Can execute on the server machine.

Types of Java Programs
ā€¢ Temporary Path Setting
ā€¢ Open command prompt
ā€¢ Copy the path of bin folder
ā€¢ Write in command prompt
ā€¢ Set path=c:Program
FilesJavaJdk1.6.0_03bin;

ā€¢ Permanent Path Setting
ā€¢ Right click on My Computer
ā€¢ Select Properties > Advanced tab >
Environment variables >new tab of
user variables > write path in
variable name > write path of bin
folder in variable value > ok

Setting Path for JDK in Windows
Java Program Life Cycle
ā€¢ Create a source document using any editor such as Notepad and save file as
.java
ā€¢ For example: HelloWorld.java

ā€¢ Compile the java file using ā€œjavacā€ command. Byte Code will be
generated on disk.

Javac HelloWorld.java

After Compilation

HelloWorld.class

ā€¢ This byte code can run on any platform or device having JVM using

ā€œjavaā€
Command.

StepS areā€¦.
class simple
{
public static void main(String args[])
{
System.out.println(ā€œHello Javaā€);
}
}

To Compile : javac simple.java
To Run
: java simple

Sample Java Program
ā€¢ class : Used to declare class in java.
ā€¢ public : Access modifier which represents the visibility.
ā€¢ static : Keyword for creating static method , so that we can access it
without creating object.
ā€¢ void : Return type of main method , its doesnā€™t return anything.
ā€¢ main : Represent the startup of the program
ā€¢ String args[] : Used to store command line arguments.

Understanding Sample
Program
Source Code
Program

Compiler

Byte code

Compilation Process

Compilation & Execution
R
U
N
T
I
M
E

P
R
O
C
E
S
S

Class file

Class Loader

Byte Code Verifier

Interpreter

Runtime

Compilation & Execution
Output Screen
ā€¢ Built-in support for multi-threading, socket communication, and memory
management (automatic garbage collection).
ā€¢ Object Oriented (OO).
ā€¢ Better portability than other languages across operating systems.
ā€¢ Supports Web based applications (Applet, Servlet, and JSP) .
ā€¢ Supports distributed applications (sockets, RMI, EJB etc.) and network
protocols (HTTP, JRMP etc.) with the help of extensive standardized
APIs (Application Programming Interfaces).

Advantages of Java Programming
Language

More Related Content

What's hot

Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
Madishetty Prathibha
Ā 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
Kritika Goel
Ā 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
RubaNagarajan
Ā 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
Ā 
Features of java
Features of javaFeatures of java
Features of javaWILLFREDJOSE W
Ā 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
Ā 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Saba Ameer
Ā 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
arvind pandey
Ā 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
Ā 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
jaimefrozr
Ā 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
Elizabeth Thomas
Ā 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
Cognizant
Ā 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
Math-Circle
Ā 
Java features
Java featuresJava features
Java features
Prashant Gajendra
Ā 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
josemachoco
Ā 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
sunmitraeducation
Ā 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
Ram132
Ā 
Java Programming
Java ProgrammingJava Programming
Java Programming
Elizabeth alexander
Ā 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
Ajeet Kumar Verma
Ā 

What's hot (20)

Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
Ā 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
Ā 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
Ā 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
Ā 
Features of java
Features of javaFeatures of java
Features of java
Ā 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Ā 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Ā 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
Ā 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
Ā 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
Ā 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
Ā 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
Ā 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
Ā 
Java
JavaJava
Java
Ā 
Java features
Java featuresJava features
Java features
Ā 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
Ā 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
Ā 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
Ā 
Java Programming
Java ProgrammingJava Programming
Java Programming
Ā 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
Ā 

Viewers also liked

Learn Java Part 2
Learn Java Part 2Learn Java Part 2
Learn Java Part 2
Gurpreet singh
Ā 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
Saravanakumar R
Ā 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Sakthi Durai
Ā 
Learn Java Part 1
Learn Java Part 1Learn Java Part 1
Learn Java Part 1
Gurpreet singh
Ā 
Tracking and positioning of mobile systems in telecommunication networks
Tracking and positioning of mobile systems in telecommunication networksTracking and positioning of mobile systems in telecommunication networks
Tracking and positioning of mobile systems in telecommunication networksgo2project
Ā 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
Tushar Chauhan
Ā 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
jyoti_lakhani
Ā 
International Journal of Electrical Power System and Technology vol 2 issue 1
International Journal of Electrical Power System and Technology vol 2 issue 1International Journal of Electrical Power System and Technology vol 2 issue 1
International Journal of Electrical Power System and Technology vol 2 issue 1
JournalsPub www.journalspub.com
Ā 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101
kankemwa Ishaku
Ā 
Java Basics
Java BasicsJava Basics
Java Basics
shivamgarg_nitj
Ā 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
Danairat Thanabodithammachari
Ā 
GSM Architecture
GSM ArchitectureGSM Architecture
GSM Architecturekoonlay
Ā 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
Ā 
Telecommunication basics
Telecommunication basicsTelecommunication basics
Telecommunication basics
Yoohyun Kim
Ā 
Core java slides
Core java slidesCore java slides
Core java slidesAbhilash Nair
Ā 
telecommunication-ppt
telecommunication-ppttelecommunication-ppt
telecommunication-pptsecomps
Ā 
Full gsm overview (modified)
Full gsm overview  (modified)Full gsm overview  (modified)
Full gsm overview (modified)
Advanced group of Institutions
Ā 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Veerabadra Badra
Ā 

Viewers also liked (20)

Learn Java Part 2
Learn Java Part 2Learn Java Part 2
Learn Java Part 2
Ā 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
Ā 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Ā 
Learn Java Part 1
Learn Java Part 1Learn Java Part 1
Learn Java Part 1
Ā 
Tracking and positioning of mobile systems in telecommunication networks
Tracking and positioning of mobile systems in telecommunication networksTracking and positioning of mobile systems in telecommunication networks
Tracking and positioning of mobile systems in telecommunication networks
Ā 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
Ā 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
Ā 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
Ā 
International Journal of Electrical Power System and Technology vol 2 issue 1
International Journal of Electrical Power System and Technology vol 2 issue 1International Journal of Electrical Power System and Technology vol 2 issue 1
International Journal of Electrical Power System and Technology vol 2 issue 1
Ā 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101
Ā 
Java Basics
Java BasicsJava Basics
Java Basics
Ā 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
Ā 
GSM Architecture
GSM ArchitectureGSM Architecture
GSM Architecture
Ā 
Java basic
Java basicJava basic
Java basic
Ā 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
Ā 
Telecommunication basics
Telecommunication basicsTelecommunication basics
Telecommunication basics
Ā 
Core java slides
Core java slidesCore java slides
Core java slides
Ā 
telecommunication-ppt
telecommunication-ppttelecommunication-ppt
telecommunication-ppt
Ā 
Full gsm overview (modified)
Full gsm overview  (modified)Full gsm overview  (modified)
Full gsm overview (modified)
Ā 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Ā 

Similar to Introduction to java

JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
Ā 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
Ā 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
Ā 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
RajeshSukte1
Ā 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
Ā 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
YounasKhan542109
Ā 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentationjuliasceasor
Ā 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
PrasadKalal4
Ā 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
kamal kotecha
Ā 
1 java introduction
1 java introduction1 java introduction
1 java introduction
abdullah al mahamud rosi
Ā 
1 java intro
1 java intro1 java intro
1 java intro
abdullah al mahamud rosi
Ā 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
Om Ganesh
Ā 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
Ā 
Java ppt1
Java ppt1Java ppt1
Java ppt1
nikhilsh66131
Ā 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
noosdysharma
Ā 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 Fast
UzairSaeed18
Ā 
Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
SURBHI SAROHA
Ā 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
BhargaviDalal3
Ā 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
DrPreethiD1
Ā 

Similar to Introduction to java (20)

JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
Ā 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Ā 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Ā 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
Ā 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
Ā 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
Ā 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
Ā 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
Ā 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
Ā 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
Ā 
1 java introduction
1 java introduction1 java introduction
1 java introduction
Ā 
1 java intro
1 java intro1 java intro
1 java intro
Ā 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
Ā 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
Ā 
Java ppt1
Java ppt1Java ppt1
Java ppt1
Ā 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
Ā 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 Fast
Ā 
Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
Ā 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
Ā 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
Ā 

Recently uploaded

Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
UiPathCommunity
Ā 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
Ā 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
Ā 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
Ā 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
Ā 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
Ā 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
Ā 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
Ā 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
Ā 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
Ā 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
Ā 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
Ā 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
Ā 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
Ā 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
Ā 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
Ā 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
Ā 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
Ā 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
Ā 

Recently uploaded (20)

Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Ā 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Ā 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Ā 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
Ā 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
Ā 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Ā 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Ā 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Ā 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Ā 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Ā 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ā 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Ā 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Ā 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
Ā 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Ā 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
Ā 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
Ā 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Ā 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Ā 

Introduction to java

  • 2. ā€¢ Today Java , is one of the most popular programming language which is used in critical applications likeā€¦ ļ± web based applications ļ±Embedded applications ļ± android mobile application. Introduction
  • 3. ā€¢ Lets have a look in history of Javaā€¦ ā€¢ Java was developed by James Gosling from Sun Microsystems in 1995. ā€¢ Introduced as an object-oriented language for general-purpose business applications and for interactive, Web-based Internet applications. ā€¢ The goal was to provide platform-independent alternative to C++. In other terms it is architecturally neutral, which means that you can use Java to write a program that will run on any platform or device. ā€¢ Instead, Java runs on a Java Virtual Machine (JVM). History & Evolution
  • 4. ā€¢ James Gosling ,Mike Sheridan and Patrick Naughton initiated the green project in June 1991. ā€¢ Originally designed for small , embedded systems in electronic appliances like set-top boxes. ā€¢ It was initially called as Oak and later on renamed as ā€œJavaā€ in 1995. ā€¢ Originally developed by James Gosling at Sun Microsystems in 1995. ā€¢ JDK 1.0 released in 1996. History and Evolution
  • 5. History of Java Releases Java Version/Code Name Release Date Important Features/Code Name JDK 1.0 (Oak) 23rd Jan 1996 Initial release JDK 1.1 19th Feb 1997 Reflection , JDBC , Inner Classes ,RMI J2SE 1.2 (Playground) 8th Dec 1998 Collection , JIT, String memory map J2SE 1.3 (Kestrel) 8th May 2000 Java Sound , Java Indexing ,JNDI J2SE 1.4 (Merlin) 6th Feb 2002 Assert , regex, exception chaining J2SE 5.0 (Tiger) 30th Sept 2004 Generics ,autoboxing ,enums Java SE 6.0 (Mustang) 11th Dec 2006 JDBC 4.0 , Java compiler API , Annotations Java SE 7.0 (Dolphin) 28th July 2011 String in switch case ,exception handling new way
  • 6. Simple: A Java programmer does not need to know the internal functioning of Java, such as how memory is allocated to data. Object-oriented: Java supports the object-oriented approach to develop programs. Compiled and interpreted: The Java programs are first compiled and then interpreted. After the program is compiled, it is converted to a bytecode. The Java Virtual Machine (JVM) then interprets this bytecode into the computer code and runs it. Portable: Refers to the ability of a program to run on any platform without changing the source code of a program. Features of Java Environment
  • 7. ā€¢ The following figure shows how the Java bytecode and the JVM together make Java programs portable on different platforms. Features of Java Environment
  • 8. Distributed: Java is designed for the distributed environment of the Internet because it supports the various Internet protocols, such as Transmission Control Protocols and Internet Protocol (TCP/IP). Secure: Java has built-in security features that verify that the programs do not perform any destructive task, such as accessing the files on a remote system. Features of Java Environment
  • 9. ā€¢ Java technology provides language part along with architecture for running applications. ā€¢ Java Architecture provides ā€¢ Portable ā€¢ high-performance ā€¢ robust runtime environment. ā€¢ Various Components of Java Architecture are : ā€¢ Java Programming Language and class file ā€¢ JVM ā€¢ Java Application Programming Interface (API) Java Architecture
  • 10. ā€¢ Java Runtime Environment contains JVM, class libraries and other supporting components. ā€¢ Java source code is compiled into bytecode by Java compiler. ā€¢ This bytecode will be stored in class files. ā€¢ During runtime, this bytecode will be loaded, verified and JVM interprets the bytecode into machine code which will be executed in the machine in which the Java program runs. Java Runtime Environment (JRE)
  • 11. ā€¢ A Java Runtime Environment performs the following main tasks respectively. ā€¢ Loads the class ā€¢ This is done by the class loader ā€¢ Verifies the bytecode ā€¢ This is done by bytecode verifier. ā€¢ Interprets the bytecode ā€¢ This is done by the JVM Java Runtime Environment (JRE)
  • 12. ā€¢ Java programming language and class file: ā€¢ Java programs are saved with an extension, .java. ā€¢ A .java file is compiled to generate the .class file, which contains the byte code. ā€¢ The JVM converts the byte code contained in the .class file to machine object code. ā€¢ The JVM needs to be implemented for each platform running on a different operating system. Java Programming Lang. & Class file
  • 13. ā€¢ Its an abstract Machine forms the base of Java Platform. ā€¢ Specification that provides runtime environment in which java byte code can be executed. ā€¢ Available for many hardware and software. ā€¢ JVM performs: ā€¢ ā€¢ ā€¢ ā€¢ Loads code Verifies code Executes code Provide Runtime Environment Java Virtual Machine (JVM)
  • 14. ā€¢ Major Components of JVM ā€¢ Class Loader ā€¢ Byte code Verifier ā€¢ Just In Time (JIT) compiler Java Virtual Machine
  • 15. Interpreter Byte Code Class Loader Byte code Verifier JIT Compiler Java Runtime Environment Java Virtual Machine Running Program
  • 16. ā€¢ Class Loader ā€¢ Class loader loads all the class files required to execute the program. ā€¢ Byte code Verifier ā€¢ ā€¢ ā€¢ ā€¢ Checks that code follows JVM specifications. There is no unauthorized access to memory. The code does not cause any stack overflows. There are no illegal data conversions in the code such as float to object references. Components of JVM
  • 17. ā€¢ JIT Compiler ā€¢ Used to improve performance. ā€¢ It translates byte code only the first time. ā€¢ If repeated execution of code is required , it is automatically mapped to the corresponding native machine code. ā€¢ JIT make use of the machine code which is cached and stored. Components of JVM
  • 18. Java Development Kit ā€¢ Package that provides the basic functionality of Java Language. ā€¢ Contains series of classes and methods ā€¢ Tools used to develop and execute java programs is known as JDK. ā€¢ It contains ā€¢ ā€¢ ā€¢ ā€¢ Basic Tools( javac,java,javap,javadoc,appletviewer etc) RMI tools (rmic,rmiregistry,rmid) Security Tools (keytools,policytool etc.) Java plug-in Tools
  • 19. Basic Tools Description Javac Compiler for java language Java Launcher of java application Javadoc API documentation generator Appletviewer Run and debug applets without a web browser Jar Manage java archive files Javap Class file dissassembler Java Development Kit
  • 20. The Java API is a collection of software components that provide capabilities, such as GUI. The related classes and interfaces of the Java API are grouped into packages. The following figure shows how the Java API and the JVM forms the platform for the Java programs on top of the hardware. Java API
  • 21. ā€¢ Java can be used to develop more dynamic programs. ā€¢ Leading programming language for wireless technology and real time embedded programming for cell phones. ā€¢ Major Categories of java programs : ā€¢ Applets ā€¢ Applications Type of Java Programs
  • 22. ā€¢ Applets ā€¢ Small program embedded in a web page. ā€¢ Applets are downloaded over network and can make network connections only to the host they are issued from. ā€¢ Graphical in nature and tends to contain controls like text field , button label etc. ā€¢ Applications ā€¢ ā€¢ ā€¢ ā€¢ Standalone programs written in java. Invoked by using a JVM. Can access the local file system. Can execute on the server machine. Types of Java Programs
  • 23. ā€¢ Temporary Path Setting ā€¢ Open command prompt ā€¢ Copy the path of bin folder ā€¢ Write in command prompt ā€¢ Set path=c:Program FilesJavaJdk1.6.0_03bin; ā€¢ Permanent Path Setting ā€¢ Right click on My Computer ā€¢ Select Properties > Advanced tab > Environment variables >new tab of user variables > write path in variable name > write path of bin folder in variable value > ok Setting Path for JDK in Windows
  • 25. ā€¢ Create a source document using any editor such as Notepad and save file as .java ā€¢ For example: HelloWorld.java ā€¢ Compile the java file using ā€œjavacā€ command. Byte Code will be generated on disk. Javac HelloWorld.java After Compilation HelloWorld.class ā€¢ This byte code can run on any platform or device having JVM using ā€œjavaā€ Command. StepS areā€¦.
  • 26. class simple { public static void main(String args[]) { System.out.println(ā€œHello Javaā€); } } To Compile : javac simple.java To Run : java simple Sample Java Program
  • 27. ā€¢ class : Used to declare class in java. ā€¢ public : Access modifier which represents the visibility. ā€¢ static : Keyword for creating static method , so that we can access it without creating object. ā€¢ void : Return type of main method , its doesnā€™t return anything. ā€¢ main : Represent the startup of the program ā€¢ String args[] : Used to store command line arguments. Understanding Sample Program
  • 28. Source Code Program Compiler Byte code Compilation Process Compilation & Execution
  • 29. R U N T I M E P R O C E S S Class file Class Loader Byte Code Verifier Interpreter Runtime Compilation & Execution
  • 31. ā€¢ Built-in support for multi-threading, socket communication, and memory management (automatic garbage collection). ā€¢ Object Oriented (OO). ā€¢ Better portability than other languages across operating systems. ā€¢ Supports Web based applications (Applet, Servlet, and JSP) . ā€¢ Supports distributed applications (sockets, RMI, EJB etc.) and network protocols (HTTP, JRMP etc.) with the help of extensive standardized APIs (Application Programming Interfaces). Advantages of Java Programming Language