C++Java
1. C++ is platform dependent. 1. Java is platform independent.
2. C++ does not support garbage collection for memory management.2. Java has the concept of automatic garbage collection for memory management.
3. C++ supports the concept of pointer, structure, union,etc.3. Java do not supports pointer, structure and union concept.
4. C++ supports operator overloading concept.4. In java there is no concept of operator overloading.
5. Multiple inheritance is possible in C++.5. Java never supports the concept of multiple inheritance in case of class.
6. C++ supports the concept of Destructor.6. In java there is no use of Destructor.
7. C++ supports both call by value and call by reference concept.7. In java there is no call by reference, it only supports call by value approach.
8. In C++ we do not have built-in support for multi-threading concept. It has to take help from third party libraries.8. Java has built-in support for multi-threading.
9. C++ includes different header files for uniform execution of the program.9. Java do not header files, rather it uses import keyword to include classes and its methods.
10. C++ is said to be compiled language.10. Java is said to be both compiled as well as interpreted.