SlideShare a Scribd company logo
1 of 14
INDEX
• Programming methodologies
• Language Development
• Why Programming Language & Evolution of Languages.
• History Of Java
• Why Only Java ?
• What is Java ?
• Where Java is Used in the industry ?
• Flavors of Java
• Features Of Java
• Architecture Of JVM
• A Basic Java program & its internal details
PROGRAMMING METHODOLOGIES
Deals with two elements:
1. Data – memory
2. Functions - code
Programming
Standards
Unstructured
Programming
Procedural
Methodology
Structured
Programming
Object Oriented
Programming
Two Techniques
4 Features
Inheritance
Polymorphism
Abstraction
Encapsulation
Object Based P/L
Any one feature of OOPs
but not all. Eg: VB
LANGUAGE DEVELOPMENT – BUILDING BLOCKS
For Natural Languages
Noun
Words
Sentences
Paragraphs
etc
Literals
Pronoun
For Programming Languages
Lexical Tokens
Statements
Program
Strings
Keywords Identifiers Operators
Grammar
Syntax - rules
Logic
To Solve Problem
(48)
Unary Binary Ternary
DATATYPES & ASSOCIATED KEYWORDS
void
Lexical Tokens
Boolean
Character Integer Floating Point
float
4B
Double
8B
Long double
10B
Char
2B
deprecated
Byte
1B
short
2B
int
4B
long
8B
boolean
True
false
6 14
Decimal points
Electronic
Devices
Microprocessors
Before
Computer
Technology
introduction
Machine & Assembly
Languages
Drawbacks
Code Complexity
Difficult to understand
Procedure Oriented
Methodology
Drawbacks
Complexity cant be handled
No Security For Data
Any part of memory can be
accessed
First Computer
Languages
High Level
Languages
Ex: C, Fortran,
Pascal, Cobol
Object Oriented Methodology
EVOLUTION OF LANGUAGES & BIRTH OF OOPS
Languages
Ex: C++, Java,
C#, ABAP
 A P/L is used to develop Applications to simplify user tasks.
 The Central Theme of any P/L is to Store, manipulate and retrieve data.
HISTORY OF JAVA
Bill Joy – Wrote “Further”
Patrick Naughton – Green Project
James Gosling – OAK (Frustration on C++)
Sun Announced Java in a Major Conference 1995
1970 - 1990
1983
1991
Time Line Releases Classes Packages
1996 Java 1.0 (JDK 1.0) 212 8
1998 Java 1.2 1548 64
2004 Java 1.4 (SDK 1.4)
2006 Java 1.5 3562 166
2008 Java 1.6
Major Releases:
WHAT IS JAVA
JAVA
Programming
Language
Platform
Technology
JVM API Class
Files
Design
Runs
Java is a multi dimensional software entity and defined as below.
 Programming Lang --- It is a Third Generation P/L like C, C++, Fortran, C#, VC++
etc. It is capable to work with internet inside electronics and supports database.
 Technology ---- Java is a Technology pertaining to Database, Electronics and
Enterprises.
 Platform ---- It is a S/W or H/W environment in which a program gets executed.
Java acts as a platform between Operating System & Application Software.
FEATURES OF JAVA
 Simple
 Object Oriented
 Network Supported
 Secured
 Portable
 Robust
 Platform Independent /
Architecture Neutral
 Dynamic
 High Performance
 Multi – Threaded
 Interpreted
Simple – It is designed to write bug free code easily. Generally, bugs related to memory
allocation and garbage collection are reduced than in C and C++.
Object Oriented – Data is represented in terms of Objects( gives security to data). Objects
have state(data) and behavior(methods). Implements all OOP’s features.
Secured – Secure execution of code. OS too doesn’t understands the byte code. JVM only
executes it. Malicious code over network can be executed securely.
Robust – JVM is developed free of bugs. Handling of exceptions to prevent crashing of
system and prohibiting the introduction of viruses by checking the byte code.
High Performance – Java Byte codes can be complied on the fly using JIT compiler. Faster Execution on
Programs. Memory never runs out.
Multi – Threaded – A single program can have different processes executing independently and
continuously. It makes java robust as processes doesn’t gets extra CPU cycles and malicious code
execution is prevented.
Dynamic(ly linked) – No Explicit linking in java. When other classes are referenced, compiler searches
them in local system and they are linked.
Portable – Source code written on one machine can work on multiple machines having different
Operating Systems and configurations.
Platform Independent - An executable code generated on one machine can work on multiple
machines having different Operating system and related JVM of that OS.
Byte Code
Executable code
(Given to JVM)
JVM
(passes to OS)
UNIX OS
Hardware
C/C++ Executable
code (given to OS)
UNIX OS
(OS executes over
H/W)
Hardware
JVM
Windows OS
Hardware
Windows
Operating
System
Hardware
Fails
cant
give to
H/w
ARCHITECTURE OF JVM – JAVA VIRTUAL MACHINE
Method
Area
Stack
Area
Heap
Area
PC
Registers
Native
Method
Stack
Native
Method
API
Class Loader
Sub System
Execution
Engine
• JVM is a Specification , Implementation & Runtime Instance for a java program to run.
• It is a specification given by Sun Micro Systems and implemented by various Vendors
and can come into existence only when Java application is executed.
Class Loader Sub System – bytecode is loaded through class loader. It uses classpath.
Method Area – It stores all the compiled instructions
Stack Area – It contains the memory space for respective methods and their local
variables. Every method call will be stored in Stack.
Heap Area – Objects are stored.
PC Registers – Program Counter – It contains the information about the next executable
instruction
Native Method Stack & Native Method API – Working with C/ C++ methods in java. We
use the native API.
Execution Engine - It loads, links and initializes memory spaces with values. Creates
objects through memory spaces.
OOPS AND ITS FEATURES
OOP’s is not a programming language. It is just a concept which has 4 features.
1. ENCAPSULATION – Binding of Data and Functions(methods) into one single unit.
2. ABSTRACTION – Providing various levels of hiding over Encapsulated data and
functions. This is used to provide security to our application.
3. POLYMORPHISM – Multiple behaviors of data and functions.
4. INHERITANCE – It is the ability to re – use the data and functions of one
encapsulation for another encapsulation.
 A Programming language which supports all the four features is known as “ Object
Oriented Programming Language”.
Ex: C++, Java, C# etc.
 If Any language supports at least one but not all four is known as “ Object Based
P/L”.
Ex: VB.
DEVELOPMENT OF JAVA PROGRAMS
Develop Source Code
Execute using
“java” command
Compile it using
“javac” command
Save with .java extension
JAVA
API
Using
Using An Editor
Notepad/ Editplus
Install the Latest JDK
Set Environment Variables
Permanently
CLASSPATH – Class Files &
Bytecode location
PATH – OS uses to
get java resources
JVM runs this not OS.
JVM uses OS for I/O.
OS uses Hardware.
.class is generated which
contains Bytecode
Compiler
Interpreter
EDITIONS / FLAVORS OF JAVA
JAVA
JAVA ME
JAVA SE
JAVA EE
Standard Edition
Micro Edition
Enterprise Edition
Stand Alone /
Desktop Based
Applications
Large Scale
Enterprise
Applications, Web
Servers
Consumer Device
applications for
mobiles, PDA, pagers
etc.

More Related Content

Similar to Basics-Of-Java

0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdfDeepakChaudhriAmbali
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unitgowher172236
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptRajeshSukte1
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptCDSukte
 
Java and its features
Java and its featuresJava and its features
Java and its featuresPydi Nikhil
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languagesactanimation
 
Introduction to java
Introduction to  javaIntroduction to  java
Introduction to javaKalai Selvi
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .pptAqeelAbbas94
 

Similar to Basics-Of-Java (20)

Unit1 JAVA.pptx
Unit1 JAVA.pptxUnit1 JAVA.pptx
Unit1 JAVA.pptx
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
 
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
 
0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unit
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Java
JavaJava
Java
 
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
 
Getting Started with JAVA
Getting Started with JAVAGetting Started with JAVA
Getting Started with JAVA
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
 
Java Intro
Java IntroJava Intro
Java Intro
 
Java seminar
Java seminarJava seminar
Java seminar
 
Java session2
Java session2Java session2
Java session2
 
Introduction to java
Introduction to  javaIntroduction to  java
Introduction to java
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .ppt
 

Recently uploaded

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Basics-Of-Java

  • 1. INDEX • Programming methodologies • Language Development • Why Programming Language & Evolution of Languages. • History Of Java • Why Only Java ? • What is Java ? • Where Java is Used in the industry ? • Flavors of Java • Features Of Java • Architecture Of JVM • A Basic Java program & its internal details
  • 2. PROGRAMMING METHODOLOGIES Deals with two elements: 1. Data – memory 2. Functions - code Programming Standards Unstructured Programming Procedural Methodology Structured Programming Object Oriented Programming Two Techniques 4 Features Inheritance Polymorphism Abstraction Encapsulation Object Based P/L Any one feature of OOPs but not all. Eg: VB
  • 3. LANGUAGE DEVELOPMENT – BUILDING BLOCKS For Natural Languages Noun Words Sentences Paragraphs etc Literals Pronoun For Programming Languages Lexical Tokens Statements Program Strings Keywords Identifiers Operators Grammar Syntax - rules Logic To Solve Problem (48) Unary Binary Ternary
  • 4. DATATYPES & ASSOCIATED KEYWORDS void Lexical Tokens Boolean Character Integer Floating Point float 4B Double 8B Long double 10B Char 2B deprecated Byte 1B short 2B int 4B long 8B boolean True false 6 14 Decimal points
  • 5. Electronic Devices Microprocessors Before Computer Technology introduction Machine & Assembly Languages Drawbacks Code Complexity Difficult to understand Procedure Oriented Methodology Drawbacks Complexity cant be handled No Security For Data Any part of memory can be accessed First Computer Languages High Level Languages Ex: C, Fortran, Pascal, Cobol Object Oriented Methodology EVOLUTION OF LANGUAGES & BIRTH OF OOPS Languages Ex: C++, Java, C#, ABAP  A P/L is used to develop Applications to simplify user tasks.  The Central Theme of any P/L is to Store, manipulate and retrieve data.
  • 6. HISTORY OF JAVA Bill Joy – Wrote “Further” Patrick Naughton – Green Project James Gosling – OAK (Frustration on C++) Sun Announced Java in a Major Conference 1995 1970 - 1990 1983 1991 Time Line Releases Classes Packages 1996 Java 1.0 (JDK 1.0) 212 8 1998 Java 1.2 1548 64 2004 Java 1.4 (SDK 1.4) 2006 Java 1.5 3562 166 2008 Java 1.6 Major Releases:
  • 7. WHAT IS JAVA JAVA Programming Language Platform Technology JVM API Class Files Design Runs Java is a multi dimensional software entity and defined as below.  Programming Lang --- It is a Third Generation P/L like C, C++, Fortran, C#, VC++ etc. It is capable to work with internet inside electronics and supports database.  Technology ---- Java is a Technology pertaining to Database, Electronics and Enterprises.  Platform ---- It is a S/W or H/W environment in which a program gets executed. Java acts as a platform between Operating System & Application Software.
  • 8. FEATURES OF JAVA  Simple  Object Oriented  Network Supported  Secured  Portable  Robust  Platform Independent / Architecture Neutral  Dynamic  High Performance  Multi – Threaded  Interpreted Simple – It is designed to write bug free code easily. Generally, bugs related to memory allocation and garbage collection are reduced than in C and C++. Object Oriented – Data is represented in terms of Objects( gives security to data). Objects have state(data) and behavior(methods). Implements all OOP’s features. Secured – Secure execution of code. OS too doesn’t understands the byte code. JVM only executes it. Malicious code over network can be executed securely. Robust – JVM is developed free of bugs. Handling of exceptions to prevent crashing of system and prohibiting the introduction of viruses by checking the byte code.
  • 9. High Performance – Java Byte codes can be complied on the fly using JIT compiler. Faster Execution on Programs. Memory never runs out. Multi – Threaded – A single program can have different processes executing independently and continuously. It makes java robust as processes doesn’t gets extra CPU cycles and malicious code execution is prevented. Dynamic(ly linked) – No Explicit linking in java. When other classes are referenced, compiler searches them in local system and they are linked. Portable – Source code written on one machine can work on multiple machines having different Operating Systems and configurations. Platform Independent - An executable code generated on one machine can work on multiple machines having different Operating system and related JVM of that OS. Byte Code Executable code (Given to JVM) JVM (passes to OS) UNIX OS Hardware C/C++ Executable code (given to OS) UNIX OS (OS executes over H/W) Hardware JVM Windows OS Hardware Windows Operating System Hardware Fails cant give to H/w
  • 10. ARCHITECTURE OF JVM – JAVA VIRTUAL MACHINE Method Area Stack Area Heap Area PC Registers Native Method Stack Native Method API Class Loader Sub System Execution Engine • JVM is a Specification , Implementation & Runtime Instance for a java program to run. • It is a specification given by Sun Micro Systems and implemented by various Vendors and can come into existence only when Java application is executed.
  • 11. Class Loader Sub System – bytecode is loaded through class loader. It uses classpath. Method Area – It stores all the compiled instructions Stack Area – It contains the memory space for respective methods and their local variables. Every method call will be stored in Stack. Heap Area – Objects are stored. PC Registers – Program Counter – It contains the information about the next executable instruction Native Method Stack & Native Method API – Working with C/ C++ methods in java. We use the native API. Execution Engine - It loads, links and initializes memory spaces with values. Creates objects through memory spaces.
  • 12. OOPS AND ITS FEATURES OOP’s is not a programming language. It is just a concept which has 4 features. 1. ENCAPSULATION – Binding of Data and Functions(methods) into one single unit. 2. ABSTRACTION – Providing various levels of hiding over Encapsulated data and functions. This is used to provide security to our application. 3. POLYMORPHISM – Multiple behaviors of data and functions. 4. INHERITANCE – It is the ability to re – use the data and functions of one encapsulation for another encapsulation.  A Programming language which supports all the four features is known as “ Object Oriented Programming Language”. Ex: C++, Java, C# etc.  If Any language supports at least one but not all four is known as “ Object Based P/L”. Ex: VB.
  • 13. DEVELOPMENT OF JAVA PROGRAMS Develop Source Code Execute using “java” command Compile it using “javac” command Save with .java extension JAVA API Using Using An Editor Notepad/ Editplus Install the Latest JDK Set Environment Variables Permanently CLASSPATH – Class Files & Bytecode location PATH – OS uses to get java resources JVM runs this not OS. JVM uses OS for I/O. OS uses Hardware. .class is generated which contains Bytecode Compiler Interpreter
  • 14. EDITIONS / FLAVORS OF JAVA JAVA JAVA ME JAVA SE JAVA EE Standard Edition Micro Edition Enterprise Edition Stand Alone / Desktop Based Applications Large Scale Enterprise Applications, Web Servers Consumer Device applications for mobiles, PDA, pagers etc.