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 consumer interface?
When is an object subject to garbage collection?
What is strings in java?
What are basic keywords?
What is object english?
What is natural ordering in java?
How to create an interface?
What is difference between jdk,jre and jvm?
What do you understand by private, protected and public?
How a variable is stored in memory?
What is a Hash Table? What are the advantages of using a hash table?
Can list be final in java?
What is public/private protected in java?
Is singleton thread safe in java?
Explain the difference between intermediate and terminal operations in java8?