How java is platform independent?

Answer Posted / ranganathkini

In the classic sense of software development, programs are
coded in higher level languages such as C/C++, then that
source code needs to be compiled into native machine
language specific to that platform so that the program is
made executable.

Java compiler on the other hand does not compile Java source
files into native machine language, instead it compiles the
source code into bytecodes. These bytecodes are platform
independant i.e. in other words specific to to the Java
Virtual Machine specification. This enables platform
independant compilation.

When the bytecode compiled programs are executed thru the
Java interpeter, it converts those bytecodes into native
machine code and executes them thru the JVM which is
specific to host environment it is running on. This enables
platform specific execution.

Is This Answer Correct ?    380 Yes 37 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we pass null as argument in java?

500


Can we have two methods in a class with the same name?

576


What is anagram in java?

512


Is arraylist zero based?

547


What is string example?

591






What are the rules for naming an array?

518


What is the list interface in java programming?

577


What is the use of default method in interface in java? Explain

539


What is null data type?

532


What does || || mean in math?

509


What is a final class ?

595


What are pass by reference and pass by value?

523


Can a private method be declared as static?

571


What is data string?

487


What is prime number in java?

530