There are following some difference between C++ and Java:-
- Java does not support operator overloading ,but C++ provide the operator overloading mechanism.
- Java does not have template classes as in C++.
- Java does not support multiple inheritance of classes as in C++ .But in Java it is accomplished by using a feature called "Interface".
- Java does not support global variables.Every variable and methods are declared and used within the class only,but C++ have global variables.
- Java does not use the pointers like C++ have.
- Java has finalize() method in place of destructor function.
- There is no header files used in Java like C++ use.Java use the concept of packages