How java is platform independent?

Answer Posted / karthik

When Java Code is compiled a byte code is generated which is
independent of the system. This byte code is fed to the JVM
(Java Virtual Machine) which resides in the system. Since
every system has its own JVM, it doesn't matter where you
compile the source code. The byte code generated by the
compiler can be interpreted by any JVM of any machine. Hence
it is called Platform independent Language.

Java's bytecodes are desgined to be read and interpreted in
exactly same manner on any computer hardware or operating
system that supports Java Runtime Environment.

The Java Virtual Machine can be called a virtual operating
system that enables a java programme to run... we are thus
calling java platform independent because a java program
will not give different outputs on different machines but
platform dependent programmes tend to give different results
when compiled on different machines...

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is run time allocation?

579


What is vector?

591


What is the length of a string?

526


Can we have 2 main methods in java class?

543


In a class implementing an interface, can we change the value of any variable defined in the interface?

559






What are filterstreams?

614


What do heavy weight components mean in java programming?

525


Can vector have duplicates in java?

509


Why does java have two ways to create child threads?

467


What is a lock or purpose of locks in java?

595


What is the use of parse function in java?

511


Explain about main() method in java ?

585


Implement two stacks using a single array.

573


Can we use both this () and super () in a constructor?

556


What are the advantages of encapsulation in java?

551