Forums Register Login

Which happen Intrepreter and compiler??

+Pie Number of slices to send: Send
What is the life cycle of JVM ??

As we know the following,
Java is both compiler and Interpreter
Java is a just-in time compiler.

javac classname.java

// using this command am compiling my code. It means JVM converts the normal Unicode(.java file) into bytecode(.class file) right??

Now when will the interpreter takes its turn ?? Before making the .class file or after making .class ??

Regards
Dhinesh
+Pie Number of slices to send: Send
 

Originally posted by Dhineshkumar raj:
javac classname.java

. . . It means JVM converts the normal Unicode(.java file) into bytecode(.class file) right??

Now when will the interpreter takes its turn ?? Before making the .class file or after making .class ??

Regards
Dhinesh

Yes, javac converts an ASCII or Unicode plain text file to bytecode.
The interpreter is called "java" and it takes its turn when you write "java classname". If there is frequently-used code the JIT compiler may compile that from bytecode into machine code to optimise performance.
See where your hand is? Not there. It's next to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1065 times.
Similar Threads
What is JVM?
What is Java Interpreter or Compiler?
how to invoke a java program using shellscript
Interpreter
javac and java (compiler and executable)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 21:40:32.