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
Explain different types of thread priorities ?
What is the unit of plancks constant?
What is the purpose of abstract class?
Explain 5 features introduced in jdk 1.7?
Can we create a class inside a class in java?
What is the difference between a field variable and a local variable?
What is nextint java?
Can set contain duplicates?
What are the restrictions that are applied to the java static methods?
List two java ide’s?
What is java console application?
What is included in core java?
What is an array length?
Will the jvm load the package twice at runtime?
What is thread safe java?