UrbanPro
true

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

COMPILATION AND INTERPRETATION

Khushi A.
04/07/2019 0 0

Compilation and Interpertation Process

                          javac (compiler)             java(interpreter)
high level code - > compile - > bytecode - > interperted - > machine code


Bytecode is intermediate code generated by compiler, this is same will be for all the systems/computers
that is why our java is portable and independent programming language.

COMMAND TO EXECUTE PROGRAM ON COMMAND PROMPT

ASSUMING WE CREATED A JAVA PROGRAM WITH CLASS NAME Calculator.java

1. javac Calculator.java // compilation is beginning, compiler generates bytecode, at once the code is compiled.

BYTECODE FILE IS SAVED AS .CLASS, for above example the file that is created is Calculator.class

2. java Calculator // interpertating is beginning, result will be generated, each and every line is checked and interperted(one - by - one)

JDK vs JRE vs JVM
JDK(JAVA DEVELOPMENT KIT) --> It holds jre, tools for the development of java application like compiler, interpreter,etc. It has physical existence in our machine.
JRE(JAVA RUNTIME ENVIRONMENT) --> it holds JVM + Java libraries and is physically present in our system.
JVM(JAVA VIRTUAL MACTINE) --> it is a virutal machine that helps to load code, verify code, and execute code.

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Java 8 Predicates
In the previous lession, we have learnt how to use filters and collectors. In filter we have passed the condition to evaluate whether the object is eligible to be filtered or not. Code given below for...

Java complete reference-herbert schildt
Sample program: class Sample { public static void main(String args ) { System.out.println("Sample") ; } } Program explanation: Keyword used in line 1- class The name...

Constructor Overloading
public class ConstructorOverloading { public ConstructorOverloading(){ System.out.println("default"); } public ConstructorOverloading(String a){ System.out.println("a"); } public ConstructorOverloading(int...
S

Sarthak C.

0 0
0

Difference Between Checked And Un-Checked Exception
1. Exception is an abnormal condition in the program, if raises program terminates abnormally. 2. Exception always occurs at runtime only, there is no chance of exception at compile time. 3. Syntactical...

Android : Application Launch time improvements.
For any standard android application, below 3 components play important roles to show 1st interface to user, so that he/she can interact with the app. 1. Custom Application class : Intialize the components...
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more