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

What are the various access specifiers for java classes?

539


What are the skills required for core java?

532


Explain about field hiding in java?

521


Why we go for collections in java?

538


What is a parameter example?

518






What is the difference between class & structure?

559


Why do we declare a class static?

533


What is the use of protected in java?

528


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

565


Can we inherit a class with private constructor?

564


How many return statement are allowed in a function?

453


What is variable and constant explain with example?

525


why not override thread to make a runnable? : Java thread

550


os is developed in c no java is more secured then c na why dont the os developed is developed using java

3516


Is java free for commercial?

487