C++ was mainly designed for systems programming and Java was created initially to support network computing.
But today java is provides support for all purpose internet,distributed system etc.
1.C++ supports pointers whereas Java does not pointers.
Although Java supports pointers in a way, that Object reference are used to pass between functions, but pointer arithematical is not possible.
2.At compilation time Java Source code converts into byte code.
The interpreter execute this byte code at run time and gives output.
Java is interpreted for the most part and hence platform independent.
C++ run and compile using compiler which converts source code into machine level languages so c++ is plate from dependents
3.Java uses compiler and interpreter both and in c++ their is only compiler.
4.C++ supports operator overloading,multiple inheritance but java does not.Java supports method overloading.
5.C++ is more nearer to hardware then Java
6.Everything is an object in Java (Single root hierarchy as everything gets derived from java.lang.Object).
7.Java is pure object oriented programming language, while C++ supports both procedural and object oriented approach.
8.Thread support is built-in Java but not in C++.
9.Internet support is built-in Java but not in C++.
10.Java does not support header file, include library files just like C++ .Java use import to include different Classes and methods.
11.Java does not support default arguments like C++.
12.There is no scope resolution operator " :: "in Java.
13.There is no "goto " statement in Java.
14.Java support call by value only.
15.Java does not support unsigned integer.
16. No preprocessor is required in Java, while C++ rely on preprocessor.
17.Java doesn’t support Templates, while C++ supports Templates for parameterized type.
18.In Java, there is bound checking on the arrays, while in C++ there is no bound checking.
19.Java doesn’t supports forward referencing, while C++ supports explicit forward referencing
20.Java supports interfaces which is missing in C++
21.Java also supports network protocols such as TCP/IP and HTTP,while C++ lacks those support.
22.Java supports distributed applications such as RMI and sockets, while C++ lacks this functionality.
23. In Java, array lengths in multidimensional can vary from one element to the next within one dimension, while in C++ multidimensional arrays lengths are of same sizes.
24.Java supports labels on break and continue statements, while in C++ there is no label functionality.
25. In Java, Strings are objects, while in C++, Strings are null-terminated character arrays.