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
How do singleton patterns work?
How are multiple inheritances done in Java?
Which is easier .net or java?
How do you override a variable in java?
Why string is immutable or final in java
Is java code slower than native code?
Can you sort a list in java?
What is difference between length and length() method in java ?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
What are the two ways of implementing multi-threading in java?
what is the volatile modifier for? : Java thread
What is difference between string and stringbuffer?
What is structure of java heap? What is perm gen space in heap?
When should a function throw an exception?
Why we used vector class?