C++ is developed for system programming. So C++ will be used to hardware programming. Java was created initially to support network computing. Java is a statically typed object-oriented language that uses a syntax similar to C, but is not compatible with it.
C++ exposes low-level system facilities.
JAVA runs in a protected virtual machine (JVM) only.
To know the complete difference go to the following link:
http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
Forums
I think Java is platform independent. Where C++ is not.