Differences between C++ and Java
1. Java is a true object-oriented language while C++ is mostly C with object- oriented extension.
2. It does not support operator overloading where as C++ supports operator overloading
3. It does not have template classes but C++ has templates
4. It does not support multiple inheritances, Java can be achieved using "interface" concept. C++ supports multiple inheritances.
5. No global variable declaration within Java, the variables and method declared in each class forms part of a class. C++ accepts global declaration of variables.
6. No pointer concept is used in Java. C++ has pointer concept
7. It does not have destructor function it has been replaced through finalize ( ) function. C++ has destructor function.
8. No header file is used in Java. C++ uses header files to include all library files.