why java is platform independent?
java is platform independent as JVM compiles source code to its byte code which is then interpreted to object code.thus any machine having a java compiler can execute that byte code.this does not depends on the hardware or the OS of the system