SlideShare a Scribd company logo
www.webstackacademy.com ‹#›
Java Programming
Language SE – 6
Module 1: Getting Started
Module 1: Getting Started
Objectives
Upon completion of this module, you should be able to:
Describe the key features of Java technology●
Write, compile and run simple java application●
Describe the function of the Java virtual machine●
Define garbage collection●
List the three task perform by Java that handle code security●
Relevance
Is the Java programming language a complete language or is it●
useful only for writing programs for the Web?
Why do you need another programming language?●
This material also serves as a guide for Oracle Certified Java Professional
(OCJP), by making the flow in alignment with prescribed syllabus
What is Java Technology?
Java technology is:●
A programming language–
A development environment–
An application environment–
A deployment environment–
It is similar in syntax to C++.●
It is used for developing the applications.●
Thanks to its scalable nature, Java has emerged as the most preferred language
in Web and Mobile application development
Primary Goals of the
Java Technology
Provides an easy-to-use language by:●
Avoiding many pitfalls of other languages–
Being object-oriented–
Enabling users to create streamlined and clear code–
Provides an interpreted environment for:●
Improved speed of development–
Code portability–
Primary Goals of the
Java Technology
Enables users to run more than one thread of activity●
● Loads classes dynamically; that is, at the time they are actually
needed
Supports changing programs dynamically during runtime by loading
classes from disparate sources
●
●
Furnishes better security
Primary Goals of the
Java Technology
The following features fulfill these goals:
The Java Virtual Machine (JVMTM) 1●
Garbage collection●
The Java Runtime Environment (JRE)●
JVM tool interface●
The Java Virtual Machine
Provides hardware platform specifications●
Reads compiled byte codes that are platform-independent●
Is implemented as software or hardware●
Is implemented in a Java technology development tool or a Web●
browser
The Java Virtual Machine(JVM) make the code run in any platform, thereby
making it platform independent
Architecture of Java Virtual Machine
The Java Virtual Machine
JVM provides definitions for the:
Instruction set (central processing unit [CPU])●
Register set●
Class file format●
Stack●
Garbage-collected heap●
Memory area●
Fatal error reporting●
High-precision timing support●
The Java Virtual Machine
The majority of type checking is done when the code is compiled.●
Implementation of the JVM approved by Sun Microsystems must be
able to run any compliant class file.
●
The JVM executes on multiple operating environments.●
Garbage Collection
Allocated memory that is no longer needed should be deallocated.●
In other languages, deallocation is the programmer’s responsibility.●
The Java programming language provides a system-level thread to
track memory allocation.
●
Garbage Collection
Allocated memory that is no longer needed should be deallocated.●
In other languages, deallocation is the programmer’s responsibility.●
The Java programming language provides a system-level thread to
track memory allocation.
●
Garbage Collection
Garbage collection has the following characteristics:
Checks for and frees memory no longer needed●
Is done automatically●
Can vary dramatically across JVM implementations●
The Java Runtime
Environment
JRE With a Just-In-Time
(JIT) Compiler
JVM Tasks
The JVM performs three main tasks:
Loads code●
●
●
Verifies code
Executes code
The Class Loader
Loads all classes necessary for the execution of a program●
Maintains classes of the local file system in separate namespaces●
Prevents spoofing●
The Bytecode Verifier
The code adheres to the JVM specification.●
The code does not violate system integrity.●
The code causes no operand stack overflows or underflows.●
The parameter types for all operational code are●
correct.
No illegal data conversions (the conversion of integers to pointers)●
have occurred.
Steps to install JDK for windows
Step 1: Download JDK for windows.
Step 2: Open and Run the file.
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Step 3: How to set Environment Variables?
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
Core Java Programming Language (JSE) : Chapter I - Getting Started
A Simple Java Application
The Test.java Application
//
// Sample "Hello World" application
//
public class Test{
public static void main (String[] args) {
System.out.println(“Hello World”);
}
}
Compiling and Running
the TestGreeting Program
Compile Test.java:
Syntax: javac filename.java
●
javac Test.java
The Test.java is compiled.●
Run the application by using the following command:●
Syntax: java filename
java Test
Locate common compile and runtime errors.●
Java Technology Runtime
Environment
Thank You

More Related Content

What's hot (20)

JVM
JVM
baabtra.com - No. 1 supplier of quality freshers
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
Qspiders - Software Testing Training Institute
 
Lec 3 01_aug13
Lec 3 01_aug13
Palak Sanghani
 
Chapter 1.3
Chapter 1.3
sotlsoc
 
02 java programming features of java i
02 java programming features of java i
Ravi Patki
 
Java 1
Java 1
KadarkaraiSelvam
 
Java virtual machine
Java virtual machine
Nikhil Sharma
 
Java architecture
Java architecture
Rakesh Vadnala
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
Java introduction
Java introduction
Kuppusamy P
 
Java introduction
Java introduction
NAVEENA ESWARAN
 
Java virtual machine
Java virtual machine
Dhanith Krishna
 
itft-Java evolution
itft-Java evolution
Atul Sehdev
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
shamnasain
 
JDK,JRE,JVM
JDK,JRE,JVM
Cognizant
 
Jvm
Jvm
baabtra.com - No. 1 supplier of quality freshers
 
Framework
Framework
Seungjoon Lee
 
Presentation on java (8)
Presentation on java (8)
Shwetakant1
 
3. jvm
3. jvm
Indu Sharma Bhardwaj
 
Byte code jvm
Byte code jvm
myrajendra
 

Similar to Core Java Programming Language (JSE) : Chapter I - Getting Started (20)

java intro.pptx
java intro.pptx
MangaiyarkarasiDurai
 
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
Getting Started with JAVA
Getting Started with JAVA
ShivamPathak318367
 
2 22CA026_Advance Java Programming_Data types and Operators.pptx
2 22CA026_Advance Java Programming_Data types and Operators.pptx
dolphiverma80
 
1 Introduction To Java Technology
1 Introduction To Java Technology
dM Technologies
 
1 Introduction To Java Technology
1 Introduction To Java Technology
dM Technologies
 
02-Java Technology Details.ppt
02-Java Technology Details.ppt
JyothiAmpally
 
Java Programming
Java Programming
Elizabeth alexander
 
Introduction to java
Introduction to java
Java Lover
 
UNIT 1 Programming in java Bsc program.pptx
UNIT 1 Programming in java Bsc program.pptx
jijinamt
 
Object Oriented Programming Part 1 of Unit 1
Object Oriented Programming Part 1 of Unit 1
VigneshkumarPonnusam1
 
Java2020 programming basics and fundamentals
Java2020 programming basics and fundamentals
swecsaleem
 
Unit1 JAVA.pptx
Unit1 JAVA.pptx
RahulAnand111531
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
 
Java introduction
Java introduction
logeswarisaravanan
 
Lecture java variable , data type, token
Lecture java variable , data type, token
ChandrashekharSingh859453
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
 
Java unit 1
Java unit 1
Shipra Swati
 
unit1.pptx
unit1.pptx
PrasadKalal4
 
2 22CA026_Advance Java Programming_Data types and Operators.pptx
2 22CA026_Advance Java Programming_Data types and Operators.pptx
dolphiverma80
 
1 Introduction To Java Technology
1 Introduction To Java Technology
dM Technologies
 
1 Introduction To Java Technology
1 Introduction To Java Technology
dM Technologies
 
02-Java Technology Details.ppt
02-Java Technology Details.ppt
JyothiAmpally
 
Introduction to java
Introduction to java
Java Lover
 
UNIT 1 Programming in java Bsc program.pptx
UNIT 1 Programming in java Bsc program.pptx
jijinamt
 
Object Oriented Programming Part 1 of Unit 1
Object Oriented Programming Part 1 of Unit 1
VigneshkumarPonnusam1
 
Java2020 programming basics and fundamentals
Java2020 programming basics and fundamentals
swecsaleem
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
 
Ad

More from WebStackAcademy (20)

Webstack Academy - Course Demo Webinar and Placement Journey
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
WSA: Scaling Web Service to Handle Millions of Requests per Second
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
 
WSA: Course Demo Webinar - Full Stack Developer Course
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
Career Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
Webstack Academy - Internship Kick Off
Webstack Academy - Internship Kick Off
WebStackAcademy
 
Building Your Online Portfolio
Building Your Online Portfolio
WebStackAcademy
 
Front-End Developer's Career Roadmap
Front-End Developer's Career Roadmap
WebStackAcademy
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
Angular - Chapter 6 - Firebase Integration
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
Angular - Chapter 5 - Directives
Angular - Chapter 5 - Directives
WebStackAcademy
 
Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - Components
WebStackAcademy
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
WebStackAcademy
 
JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
JavaScript - Chapter 15 - Debugging Techniques
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Webstack Academy - Course Demo Webinar and Placement Journey
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
WSA: Scaling Web Service to Handle Millions of Requests per Second
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
 
WSA: Course Demo Webinar - Full Stack Developer Course
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
Career Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
Webstack Academy - Internship Kick Off
Webstack Academy - Internship Kick Off
WebStackAcademy
 
Building Your Online Portfolio
Building Your Online Portfolio
WebStackAcademy
 
Front-End Developer's Career Roadmap
Front-End Developer's Career Roadmap
WebStackAcademy
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
Angular - Chapter 6 - Firebase Integration
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
Angular - Chapter 5 - Directives
Angular - Chapter 5 - Directives
WebStackAcademy
 
Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - Components
WebStackAcademy
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
WebStackAcademy
 
JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
JavaScript - Chapter 15 - Debugging Techniques
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Ad

Recently uploaded (20)

“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 

Core Java Programming Language (JSE) : Chapter I - Getting Started

  • 1. www.webstackacademy.com ‹#› Java Programming Language SE – 6 Module 1: Getting Started Module 1: Getting Started
  • 2. Objectives Upon completion of this module, you should be able to: Describe the key features of Java technology● Write, compile and run simple java application● Describe the function of the Java virtual machine● Define garbage collection● List the three task perform by Java that handle code security●
  • 3. Relevance Is the Java programming language a complete language or is it● useful only for writing programs for the Web? Why do you need another programming language?● This material also serves as a guide for Oracle Certified Java Professional (OCJP), by making the flow in alignment with prescribed syllabus
  • 4. What is Java Technology? Java technology is:● A programming language– A development environment– An application environment– A deployment environment– It is similar in syntax to C++.● It is used for developing the applications.● Thanks to its scalable nature, Java has emerged as the most preferred language in Web and Mobile application development
  • 5. Primary Goals of the Java Technology Provides an easy-to-use language by:● Avoiding many pitfalls of other languages– Being object-oriented– Enabling users to create streamlined and clear code– Provides an interpreted environment for:● Improved speed of development– Code portability–
  • 6. Primary Goals of the Java Technology Enables users to run more than one thread of activity● ● Loads classes dynamically; that is, at the time they are actually needed Supports changing programs dynamically during runtime by loading classes from disparate sources ● ● Furnishes better security
  • 7. Primary Goals of the Java Technology The following features fulfill these goals: The Java Virtual Machine (JVMTM) 1● Garbage collection● The Java Runtime Environment (JRE)● JVM tool interface●
  • 8. The Java Virtual Machine Provides hardware platform specifications● Reads compiled byte codes that are platform-independent● Is implemented as software or hardware● Is implemented in a Java technology development tool or a Web● browser The Java Virtual Machine(JVM) make the code run in any platform, thereby making it platform independent
  • 9. Architecture of Java Virtual Machine
  • 10. The Java Virtual Machine JVM provides definitions for the: Instruction set (central processing unit [CPU])● Register set● Class file format● Stack● Garbage-collected heap● Memory area● Fatal error reporting● High-precision timing support●
  • 11. The Java Virtual Machine The majority of type checking is done when the code is compiled.● Implementation of the JVM approved by Sun Microsystems must be able to run any compliant class file. ● The JVM executes on multiple operating environments.●
  • 12. Garbage Collection Allocated memory that is no longer needed should be deallocated.● In other languages, deallocation is the programmer’s responsibility.● The Java programming language provides a system-level thread to track memory allocation. ●
  • 13. Garbage Collection Allocated memory that is no longer needed should be deallocated.● In other languages, deallocation is the programmer’s responsibility.● The Java programming language provides a system-level thread to track memory allocation. ●
  • 14. Garbage Collection Garbage collection has the following characteristics: Checks for and frees memory no longer needed● Is done automatically● Can vary dramatically across JVM implementations●
  • 16. JRE With a Just-In-Time (JIT) Compiler
  • 17. JVM Tasks The JVM performs three main tasks: Loads code● ● ● Verifies code Executes code
  • 18. The Class Loader Loads all classes necessary for the execution of a program● Maintains classes of the local file system in separate namespaces● Prevents spoofing●
  • 19. The Bytecode Verifier The code adheres to the JVM specification.● The code does not violate system integrity.● The code causes no operand stack overflows or underflows.● The parameter types for all operational code are● correct. No illegal data conversions (the conversion of integers to pointers)● have occurred.
  • 20. Steps to install JDK for windows Step 1: Download JDK for windows.
  • 21. Step 2: Open and Run the file.
  • 27. Step 3: How to set Environment Variables?
  • 37. A Simple Java Application The Test.java Application // // Sample "Hello World" application // public class Test{ public static void main (String[] args) { System.out.println(“Hello World”); } }
  • 38. Compiling and Running the TestGreeting Program Compile Test.java: Syntax: javac filename.java ● javac Test.java The Test.java is compiled.● Run the application by using the following command:● Syntax: java filename java Test Locate common compile and runtime errors.●