Basis C++ Java Platform C++ is Platform Dependent Java is Platform Independent Application C++ is mainly used for System Programming Java is Mainly used for Application Programming Hardware C++ is nearer to hardware Java is not so interactive with hardware Global Scope C++ supports global and namespace scope. Java doesn’t support global scope. Not Supporting Functionality supported in Java but not in C++ are:
- thread support
- documentation comment
- unsigned right shift(>>>)
Functionality supported in C++ but not in Java are:
- goto
- Pointers
- Call by reference
- Structures and Unions
- Multiple Inheritance
- Virtual Functions
OOPS C++ is an object-oriented language. It is not a single root hierarchy . Java is also an object-oriented language. It is a single root hierarchy as everything gets derived from a single class (java.lang.Object). Inheritance Tree C++ always creates a new inheritance tree. Java uses a Single inheritance tree as classes in Java are the child of object classes in Java.