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
What is bufferedwriter?
What is the difference between final, finally and finalize()?
How to instantiate member inner class?
Which list is sorted in java?
Why static functions are used?
Explain the reason behind ending a program with a system.exit(0)?
How will you reverse a link list without using recursion?
What is arrays fill in java?
How do you sort a list in java?
Is null in java?
What is the difference between compare and compareto in java?
How do you format in java?
how many types of Inheritance?
What is the best definition for data?
Give example to differentiate between call by value and call by reference.