Platform independent means the execution of the program is not restricted by the type of os environment provided...thereby, make it possible to process the program at any type of environement available.
Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.
Whereas C and C++ are complied languages which makes them platform dependent. The source code written in C / C++ gets transformed into an object code which is machine and OS dependent. That's the reason why C and C++ languages are termed as Platform Dependent.
RE: what is platform independent?why java is called so...
Platform independent means the execution of the program is not restricted by the type of os environment provided...thereby make it possible to process the program at any type of environement available.
Java is a platform independent language becoz of the bytecode magic of java. In java when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.
Whereas C and C++ are complied languages which makes them platform dependent. The source code written in C / C++ gets transformed into an object code which is machine and OS dependent. That's the reason why C and C++ languages are termed as Platform Dependent.
RE: what is platform independent?why java is called so...
Platform independent means write once run anywhere .Java is called so because it can run on any machine having the java core independent of the platform.Platform dependent is just the opposite of platform independent.The source code has to be modified according to the platform.C and C++ are so called because it's code has to be changed concerning the machine.
RE: what is platform independent?why java is called so?and what is platform dependent,why C,C++ is called so?
In Java the source program is first compiled that generates BYTE CODE which is common for all platform. The Byte code is given to JVM (Interpreter) each platform has its own JVM. which converts byte code into machine language that can be understood by the particular machine only. Once the machine having JVM it can run any java program. In C C++ the source program directly compiled into machine code which is platform dependent.