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
What is the abstract class?
What is meant by final class?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
who can i handle multiple client in RMI
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
Why do we use variables?
What is integers and example?
What are the advantages of packages in java?
What is the purpose of file class?
How do you check if a character in a string is a digit or letter?
How do I write a self declaration?
What is replaceall in java?
Can we execute a program without main?
What is a conditional equation?
What is the largest long allowed by java?