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

How does predicate work in java?

534


Can we write a class without main method in java?

483


Does java allow default arguments?

592


What is the platform?

533


Is java still necessary?

620






Which is the class in java?

519


How do you identify independent and dependent variables?

503


What is difference between null and void?

531


What happens if main method is not static?

495


Is sizeof a preprocessor?

542


What classes of exceptions may be caught by a catch clause in java programming?

701


Add a value x to array from index l to r where 0 <= l <= r <= n-1

632


Who is the owner of java?

536


what is the difference between future and callable interface in java?

604


What is the purpose of tostring() method in java?

552