Why Java is a platform independent language?
Answer Posted / ashwani maddeshiya
This is because of the magic of Byte Code which is OS indepedent. When java compiler compile any code then it generate the byte code not the machine native code(unlike C compiler).Now this byte code need a interpreter to execute on a machine.This interpreter is JVM.So JVM read that byte code(that is machine indepedent) amd execute it. Different JVM is designed for different OS and byte code is able to run on different OS.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What steps are taken when the OS shifts from one-thread execution to another?
When would you use a static class?
What is the base class of all exception classes in java?
What is variable and its types?
Can we rethrow the same exception from catch handler?
Is a boolean 1 bit?
How do you reverse a word in java?
What is an error in java?
What is nullpointerexception?
What do you mean by collectors in java 8?
How do you create an array in java?
What java ide should I use?
What is math exp in java?
What is jvm? How its run?
What is the difference between array and array list in java?