In C we use only compiler. Why java uses both compiler and
interpreter? What is its significance?
Answer Posted / kuldeep sharma
Java is Platform Independent language it uses Virtual
System (JVM) in an existing operating system to run
programs.
The JVM itself is not Platform independent it is platform
dependent. but its functionality is same for all verison of
JVM for different OSs.
The Source Code of a Java Program is compiled to avail the
advantages of compiler like fast development, i mean all
the errors are checked and displayed by the compiler at once
(in 99.99% cases) to make the code error free.
An error free Java Code is converted into BYTECODE ;
directly understood by the JVM(for all OSs).
Now consider we compiled a.java >> a.class on linux, the
a.class is portable and runnable on other OS like Windows
because class files are fun by JVM but not by the OSs that
why we can say
Java is platform Independent.
| Is This Answer Correct ? | 12 Yes | 4 No |
Post New Answer View All Answers
How do you check if a string contains only numeric digits?
How many bytes is a string java?
Difference between operator overloading and function overloading
What is java reflection?
What is the difference between equals() and == in java?
How many ways can an argument be passed to a subroutine and explain them?
What is wrapper class html?
Is it possible for a yielded thread to get chance for its execution again?
What is the difference between abstraction and encapsulation?
What happens if we override private method?
Can constructor be static or final?
Is math an abstract class in java?
what r advatages of websphere? & how to deploy?
Is static variable stored in heap?
What does nextint () do in java?