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

Can you sort a list in java?

760


What is an infinite loop? How infinite loop is declared?

805


How do constructors use this() and super()?

831


What is difference between wait and notify in java?

823


What is the syntax and characteristics of a lambda expression?

817


Is array serializable java?

741


Is set thread safe java?

724


Define canvas?

768


What is stringreader?

725


What is the use of :: in java?

799


What is the use of System class?

867


What is the difference between actual and formal parameters?

728


Why java applets are more useful for intranets as compared to internet?

826


Tell some latest versions in JAVA related areas?

785


What is e in java?

749