What do you mean by platform independence?
The feature of Platform independent is nothing but a concept of Write-once-run-anywhere is the key feature of java language that makes java as the most powerful language. Not even a single language is idle to this feature but java is more closer to this feature. The programs written on one platform can run on any platform provided the platform must have the JVM.
Platform indipendance mean a program shoud run with any processor without changing the code. In java, the compilation code(.class) is system indipendence. it mean it is same in every operating system. The jvm convert the compilation code into processor dependent code. Hence the compilation code is executed by any processor. Hence java is called platform indipendence.