why java is platform independent?
Java is platform independent because when u compile ur .java file u will get a .class file.JVM can run only .class files and this .class file contains byte code of ur source code.And this .class file doesn't uses any processor's or Operating Systems code like .exe file.
Exactly saying our JVM makes java platform independent and this particular JVM is platform dependent