SlideShare a Scribd company logo
Internal Details of Hello Java
Program
 In the previous page, we have learned
about the first program, how to compile
and how to run the first java program.
Here, we are going to learn, what
happens while compiling and running the
java program. Moreover, we will see some
question based on the first program.
What happens at compile
time?
 At compile time, java file is compiled by
Java Compiler (It does not interact with
OS) and converts the java code into
bytecode.
What happens at runtime?
 At runtime, following steps are performed:
Classloader: is the subsystem of JVM that is used to load class files.
Bytecode Verifier: checks the code fragments for illegal code that
can violate access right to objects.
Interpreter: read bytecode stream then execute the instructions.
Q)Can you save a java source
file by other name than the
class name?
 Yes, if the class is not public. It is explained
in the figure given below:
To compile: javac Hard.java
To execute: java Simple
Q)Can you have multiple
classes in a java source file?
 Yes, like the figure given below illustrates:
Difference between JDK, JRE
and JVM
 Brief summary of JVM
 Java Runtime Environment (JRE)
 Java Development Kit (JDK)
Difference between JDK, JRE
and JVM
 Understanding the difference between
JDK, JRE and JVM is important in Java. We
are having brief overview of JVM here.
 If you want to get the detailed
knowledge of Java Virtural Machine,
move to the next page. Firstly, let's see the
basic differences between the JDK, JRE
and JVM.
JVM
 JVM (Java Virtual Machine) is an abstract
machine. It is a specification that provides
runtime environment in which java
bytecode can be executed.
 JVMs are available for many hardware
and software platforms. JVM, JRE and JDK
are platform dependent because
configuration of each OS differs. But, Java
is platform independent.
 The JVM performs following main tasks:
 Loads code
 Verifies code
 Executes code
 Provides runtime environment
JRE
 JRE is an acronym for Java Runtime
Environment.It is used to provide runtime
environment.It is the implementation of
JVM.It physically exists.It contains set of
libraries + other files that JVM uses at
runtime.
 Implementation of JVMs are also actively
released by other companies besides Sun
Micro Systems.
JRE
JDK
 JDK is an acronym for Java Development
Kit.It physically exists.It contains JRE +
development tools.
2. hello java
2. hello java
2. hello java
2. hello java
2. hello java

More Related Content

What's hot (20)

PPTX
Java virtual machine
Nikhil Sharma
 
PPTX
Java lab zero lecture
vishal choudhary
 
PPTX
Java lab lecture 1
vishal choudhary
 
PPTX
Jdk,jre,jvm
Kritika Goel
 
PPTX
Java 1
KadarkaraiSelvam
 
PDF
Introduction to java technology
Indika Munaweera Kankanamge
 
PPTX
Architecture diagram of jvm
home
 
PDF
Chapter 1. java programming language overview
Jong Soon Bok
 
PPTX
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
PPTX
Chapter 1.3
sotlsoc
 
PPT
1 2 java development
Ken Kretsch
 
PPT
Chapter 1 introduction to java technology
sshhzap
 
PPT
Java begin so we win
IT
 
PPTX
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
shamnasain
 
ODT
Making Applications Work Together In Eclipse
Kaniska Mandal
 
PPTX
Java Course In Thane,Mumbai
nettech90
 
PDF
02 java programming features of java i
Ravi Patki
 
DOCX
Java
Abhishek Sharma
 
PPTX
Java JVM
KadarkaraiSelvam
 
PPTX
JAVA ENVIRONMENT
josemachoco
 
Java virtual machine
Nikhil Sharma
 
Java lab zero lecture
vishal choudhary
 
Java lab lecture 1
vishal choudhary
 
Jdk,jre,jvm
Kritika Goel
 
Introduction to java technology
Indika Munaweera Kankanamge
 
Architecture diagram of jvm
home
 
Chapter 1. java programming language overview
Jong Soon Bok
 
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
Chapter 1.3
sotlsoc
 
1 2 java development
Ken Kretsch
 
Chapter 1 introduction to java technology
sshhzap
 
Java begin so we win
IT
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
shamnasain
 
Making Applications Work Together In Eclipse
Kaniska Mandal
 
Java Course In Thane,Mumbai
nettech90
 
02 java programming features of java i
Ravi Patki
 
JAVA ENVIRONMENT
josemachoco
 

Similar to 2. hello java (20)

PDF
Internal working JVM
ShubhamGupta345141
 
DOCX
Java JDK.docx
Bornali Das
 
PDF
Basic difference between jdk,jre,jvm in advance java course
Preeti Agarwal
 
PDF
Run time data areas
shohan_slideshare
 
PDF
Hello World Program in Java .pdf
SudhanshiBakre1
 
PPTX
HELLO JAVA PROGRAM
Rhythm Suiwal
 
PPTX
Java fundamentals
Om Ganesh
 
DOCX
JDK,JRE,JVM
Cognizant
 
PPTX
What is Java? Presentation On Introduction To Core Java By PSK Technologies
PSK Technolgies Pvt. Ltd. IT Company Nagpur
 
PPTX
Introduction to java
Java Lover
 
PPTX
Java
Zeeshan Khan
 
PPTX
01. Introduction to programming with java
Intro C# Book
 
PPTX
Manually exercising input combinations on the bench or with a microcontroller
mazenkeke2005
 
PPTX
Java introduction
The icfai university jaipur
 
PPTX
java intro.pptx
MangaiyarkarasiDurai
 
PDF
JAVA for Every one
Satyam Pandey
 
PPTX
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
PDF
JAVA Program Examples
Prof Chethan Raj C
 
Internal working JVM
ShubhamGupta345141
 
Java JDK.docx
Bornali Das
 
Basic difference between jdk,jre,jvm in advance java course
Preeti Agarwal
 
Run time data areas
shohan_slideshare
 
Hello World Program in Java .pdf
SudhanshiBakre1
 
HELLO JAVA PROGRAM
Rhythm Suiwal
 
Java fundamentals
Om Ganesh
 
JDK,JRE,JVM
Cognizant
 
What is Java? Presentation On Introduction To Core Java By PSK Technologies
PSK Technolgies Pvt. Ltd. IT Company Nagpur
 
Introduction to java
Java Lover
 
01. Introduction to programming with java
Intro C# Book
 
Manually exercising input combinations on the bench or with a microcontroller
mazenkeke2005
 
Java introduction
The icfai university jaipur
 
java intro.pptx
MangaiyarkarasiDurai
 
JAVA for Every one
Satyam Pandey
 
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
JAVA Program Examples
Prof Chethan Raj C
 
Ad

More from Indu Sharma Bhardwaj (18)

PPTX
E commerce
Indu Sharma Bhardwaj
 
PPT
Ui design final
Indu Sharma Bhardwaj
 
PPT
Software re engineering
Indu Sharma Bhardwaj
 
PPT
Software project management 3
Indu Sharma Bhardwaj
 
PPT
Software project management
Indu Sharma Bhardwaj
 
PPT
Software process and project metrics
Indu Sharma Bhardwaj
 
PPT
Software maintenance
Indu Sharma Bhardwaj
 
PPT
Software resuse
Indu Sharma Bhardwaj
 
PPT
Risk analysis
Indu Sharma Bhardwaj
 
PPT
Design final
Indu Sharma Bhardwaj
 
PPT
Debugging
Indu Sharma Bhardwaj
 
PPTX
10 common english mistakes
Indu Sharma Bhardwaj
 
PPTX
6. static keyword
Indu Sharma Bhardwaj
 
PPTX
4. method overloading
Indu Sharma Bhardwaj
 
PPTX
1 .java basic
Indu Sharma Bhardwaj
 
Ui design final
Indu Sharma Bhardwaj
 
Software re engineering
Indu Sharma Bhardwaj
 
Software project management 3
Indu Sharma Bhardwaj
 
Software project management
Indu Sharma Bhardwaj
 
Software process and project metrics
Indu Sharma Bhardwaj
 
Software maintenance
Indu Sharma Bhardwaj
 
Software resuse
Indu Sharma Bhardwaj
 
Risk analysis
Indu Sharma Bhardwaj
 
Design final
Indu Sharma Bhardwaj
 
10 common english mistakes
Indu Sharma Bhardwaj
 
6. static keyword
Indu Sharma Bhardwaj
 
4. method overloading
Indu Sharma Bhardwaj
 
1 .java basic
Indu Sharma Bhardwaj
 
Ad

Recently uploaded (20)

PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 

2. hello java

  • 1. Internal Details of Hello Java Program  In the previous page, we have learned about the first program, how to compile and how to run the first java program. Here, we are going to learn, what happens while compiling and running the java program. Moreover, we will see some question based on the first program.
  • 2. What happens at compile time?  At compile time, java file is compiled by Java Compiler (It does not interact with OS) and converts the java code into bytecode.
  • 3. What happens at runtime?  At runtime, following steps are performed:
  • 4. Classloader: is the subsystem of JVM that is used to load class files. Bytecode Verifier: checks the code fragments for illegal code that can violate access right to objects. Interpreter: read bytecode stream then execute the instructions.
  • 5. Q)Can you save a java source file by other name than the class name?  Yes, if the class is not public. It is explained in the figure given below: To compile: javac Hard.java To execute: java Simple
  • 6. Q)Can you have multiple classes in a java source file?  Yes, like the figure given below illustrates:
  • 7. Difference between JDK, JRE and JVM  Brief summary of JVM  Java Runtime Environment (JRE)  Java Development Kit (JDK)
  • 8. Difference between JDK, JRE and JVM  Understanding the difference between JDK, JRE and JVM is important in Java. We are having brief overview of JVM here.  If you want to get the detailed knowledge of Java Virtural Machine, move to the next page. Firstly, let's see the basic differences between the JDK, JRE and JVM.
  • 9. JVM  JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.  JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.
  • 10.  The JVM performs following main tasks:  Loads code  Verifies code  Executes code  Provides runtime environment
  • 11. JRE  JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is the implementation of JVM.It physically exists.It contains set of libraries + other files that JVM uses at runtime.  Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.
  • 12. JRE
  • 13. JDK  JDK is an acronym for Java Development Kit.It physically exists.It contains JRE + development tools.