JAVA:Platform Independent programming language
In normal programming language like c or cpp when we compiled our program in say windows xp then we can use that object code in another xp system but not even in vista or linux so they are platform dependent.
Java breaks all these restriction, Java gives the freedom to
write and compile the program in any platform or machine and the same program
can run on different platform and machine. Example Java program written for
Linux system can also run on windows and UNIX etc.
step 1:first java compiler create a class file after compiling the code which is independent of platform
step 2:then JVM(which is platform dependent) execute that code so that platform independency is possible