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


Please Help Members By Posting Answers For Below Questions

Should a main method be compulsorily declared in all java classes?

529


whatis Home interface and Remoteinterface? with example?

1541


What is difference between path and classpath in java?

481


What is array size in java?

493


How to calculate the length of a singly linked list in java?

581






What is the use of arraylist class in java?

548


What is Classloader in Java?

632


What is the importance of hashcode() and equals() methods?

574


What is a cup of java?

553


Can the garbage collection be forced by any means?

527


What is double checked locking in singleton?

604


Define class?

512


what methods would you overwrite in java.lang.object class?

560


What is meant by method?

575


What is the purpose of static keyword in java?

509