Define "better." Neither is "better." They are just "different."
The main difference is that Java is "interpreted" while C++ has to be "compiled." This means that code written in Java will work on any platform or device, while code for C++ has to be rewritten and recompiled for each different platform. IF you are writing an small app to run from the Internet, Java is a good choice because it works on anything, while with C++ you would have to create multiple versions of the program for Windows, Apple, Droid, Linux, etc.
The downside to Java is that you have to install the Java program on your device before you can run any Java apps. And you have to keep it up to date. With a C++ program, you do not have to do this. IF you are supporting a large environment with hundreds of PCs you would not want to have to keep the Java up to date on every computer. It is a nightmare!! (Trust me on this one.) So C++ is a better choice for large applications that sun on individual computers.
Also since Java is "interpreted" at the time the program runs on your PC, it is easier to hack into. SO it is less secure and easier to break. C++ in already convert to the code your PC needs when it is compiled, so it is much harder to hack.
There are advantages and disadvantages to both languages. Neither is "better." But one may be "better" to use in specific situations. Java is good for small apps on the Internet. C++ is good for large scale applications run in a multiple computer environment.