What makes Java Platform Independent?

Answered

What makes Java Platform Independent? Explain.

Ninja Asked on 19th September 2018 in Java.
Add Comment
2 Answer(s)
Best answer

When we compile a java file, we get a class file which contains bytecode. JVM converts bytecode to executable instructions as per the respective operating system. Executable instructions are different for each operating system. So, JVM is different for every operating system.

The platform dependency of JVM makes Java platform independent. 

Ninja Answered on 19th September 2018.
Add Comment

Platform independent language means once compiled you can execute the program on any platform (OS).

Java is platform independent. Because the Java compiler converts the source code to bytecode, which is Intermidiate Language. Bytecode can be executed on any platform (OS) using JVM( Java Virtual Machine).

 

Default Answered on 19th November 2018.
Add Comment