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


Please Help Members By Posting Answers For Below Questions

What is object cloning in Java?

640


What is volatile data type?

553


Can we able to pass objects as an arguments in java?

539


What are loops in java? What are three types of loops?

553


Is array passed by reference in java?

584






What is a dynamic array in java?

567


What is a null point?

559


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2063


What is the difference between superclass and subclass?

550


Are floats faster than doubles?

568


Can the garbage collection be forced by any means?

536


Can singleton class be cloned?

565


What do u mean by variable?

569


How do I run java on windows?

533


Is linkedlist thread safe in java?

565