Why Java is a platform independent language?

Answer Posted / ashwani maddeshiya

This is because of the magic of Byte Code which is OS indepedent. When java compiler compile any code then it generate the byte code not the machine native code(unlike C compiler).Now this byte code need a interpreter to execute on a machine.This interpreter is JVM.So JVM read that byte code(that is machine indepedent) amd execute it. Different JVM is designed for different OS and byte code is able to run on different OS.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does hashset work in java?

576


What is the final field modifier?

554


What is a pattern what is an anti pattern?

514


Is string an object?

664


Do I need java on my computer?

536






Why are pointers not secure?

545


What is balanced tree in java?

542


What is the collections api?

579


How do I run java on windows?

542


What are advantages of exception handling in java?

594


What is jvm? How its run?

666


What is finally block?

576


Is void a data type in java?

530


What is the default size of set in java?

508


What are the important features of Java 11 release?

589