Let me keep it as points.
- C++ programs can be executable without class but not Java. Everything extends into an object class in Java.
- In C++, compiler translates the source code into specific object files/executable files for the specific machine architecture whereas in Java, the compilation results in machine independent object code (class files) which is later run by the virtual machine.
- C++ is a compiled language that is directly executable on the machine and no runtime environment is required. But, JRE is required to run Java.
- Due to the 3rd reason, compilation is faster in C++
- C++ is platform/architecture dependent, so all C++ programs will be compiled separately for every Windows/Linux/Mac. Java is platform independent.
Will be updated......
Comments
Post a Comment