when there is a need of jvm then how we can say that java
is a platform independent language?
Answer Posted / vatsal doshi
JVM is actually a virtual machine, which operates at one level of abstraction above the actual platform.
Platform = OS + Underlying Hardware
Now, Java compiled code(byte code) is targetted to run on JVM, independent of underlying actual platform.
So, Java code written on windows can be directly run on linux/mac/solaris, without recompilation, provided JVM is installed in the target machine.
We have different implementations of JVM for different platforms. The advantage is that though JVM is platform dependent, but the compiled code now becomes platform independent.
| Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
Write code of any action class?
Which is better singleton or static class?
What is nested class?
Do you know why doesn't the java library use a randomized version of quicksort?
Is null keyword in java?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
Print Vertical traversal of a Binary Tree.
What is a static method in java?
What happens if an exception is throws from an object's destructor?
What are the six ways to use this keyword?
Which collection is sorted in java?
Can we sort hashmap in java?
What is an immutable class? How to create an immutable class?
What is final keyword in java?
How do you implement tree mirroring in java?