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: