C++ Java
It is not purely object oriented programming language. It is purely Object Oriented programming language.
Pointers are available in C++ No pointers in Java
Programmer is responsible for memory allocating and de-allocating. JVM is responsible for memory allocating and de-allocating.
C++ has goto statements No goto statements
C++ supports operator overloading Java does not support operator overloading
C++ supports multiple inheritance Java does not support multiple inheritance ,but there is way we can achieve it.(using interfaces)
C++ supports #define,#typedef and header files Java doesn’t not have header files,but there is way to achieve it.(using import)
C++ has 3 access specifiers private,protected and public Java has 4 access specifiers default,public,protected,private
C++ has constructors and destructors Only constructors are available in Java.