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 happens if we don’t define serial version uid?

572


What is unicode with example?

614


What is sizeof () operator?

573


what is instanceof operator used in java?

597


Explain about map interface in java?

595






What is formatted output in java?

503


Is ++ operator thread-safe in java?

638


What is the use of conditional statement?

566


What are the different types of constructor?

530


How do you check if two given string are anagrams?

555


Is oracle charging for java?

550


What is type safety in java?

491


What do you mean by formatting?

549


What is a static class in java?

559


What do u mean by variable?

569