C++ vs Java

Let me keep it as points. 
  1. C++ programs can be executable without class but not Java. Everything extends into an object class in Java. 
  2. 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. 
  3. 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. 
  4. Due to the 3rd reason, compilation is faster in C++
  5. 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