Why Java is a platform independent language?

Answer Posted / shital mhetre

Platform independent is nothing but write-once
Run-Anywhere.It means program can run on any Operating
System(OS).

compiler Interpreter
Java source code------->M/C code------->Linux or windows
javac JVM
Fig.

When you compile a source code by using javac compiler you
will get .class file which contains byte code.
that byte code can understand by JVM(Java Virtual Machine).
so, the JVM is different for different OS(operating system).
after that the JVM will convert the byte code(by using
interpreter) into machine understandable code i.e 1's & 0's.
Java is compiler as well as Interpreter Programming Language.

Is This Answer Correct ?    12 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sortedmap in java?

531


How do you trim a space in java?

480


How do you define a method?

492


What is the difference between the size and capacity of a vector?

545


Why declare Main() method as a static in java ?

570






Can bool be null?

497


What is final modifier?

544


What is fail fast in java?

555


What are functions in java?

484


How can we make copy of a java object?

526


What is better- service oriented or batch oriented solutions?

1481


What is a lightweight component?

567


Write a program to print all permutations of string?

660


What is unicode used for?

555


What is the major drawback of internal iteration over external iteration?

557