Java is platform independent because it is different from other languages like C, C++, etc. which are compiled into platform specific machines while Java is a write once, run anywhere language https://www.acte.in/java-online-training .A platform is the hardware or software environment in which a program runs.
There are two types of platforms software-based and hardware-based https://www.acte.in/java-training-in-chennai .Java provides a software-based platform.