Why Java is a platform independent language?Explain byte code
and JVM

Answer Posted / nilanjan

At first the java source code is compiled and then it is
interpreted to a optimized set of executable statements.
After compiling the source code the bytecode is generated
which is same for all platforms i.e OS. This byte code
needs JVM(java virtual machine) to be interprated which is
defferent for different OS i.e platform.
Due to the byte code which is same for all JVM java is
explicitely known as platform independent language.

source code ---------> bytecode ----------> executable
compilation same interpration
for all by JVM
JVM

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is more secure: java or activex? : java security

517


How do I run a java program from the command line?

449


Can I have multiple main methods in the same class?

487


What does @override mean in java?

487


In hibernate what is the difference between the Session and SessionFactory?

533






What is meant by rest api in java?

480


What is crud operations in java?

476


What is log4j in java?

494


Where is singleton design pattern used in java?

476


What is stateless in java?

504


How do I run a project in netbeans?

488


What is the difference between lambda expression and anonymous methods?

473


1.can i use super keyword in normal class(not inheritance) to call any method?if so how can i call particular variable? 2.In the inheritance how can i access the particular variable from the base class(it containing 5 variables) using super keyword?

1662


What is gui in java with examples?

485


How long can a lambda function run?

477