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
Can we catch more than one exception in single catch block?
What is the differences between c++ and java? Explain
What are the 6 functions?
Why can't we use static class instead of singleton?
What does @param args mean in java?
What is java util list?
List implementations of list interface?
What is the nested interface?
define polymorphism in java
What are different types of constants?
What does function identity () do?
What are runtime exceptions?
What is getkey () in java?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
Can you create an object of an abstract class?