Both languages are turing-complete. And both languages allow you to call C code, so the two languages are equally versatile. There's nothing you can do in one of them, which can't, with enough effort, be done in the other as well.
As for efficiency, languages don't have one.
A naive compiler will usually generate ridiculously slow code for both languages. What makes them efficient is the extent to which the compiler optimizes the code. And good compilers exist for both languages, meaning that both languages can potentially be very efficient. There are a few areas where Java is, and will always be, at a disadvantage (it has to load a large runtime, so startup costs are higher, for example), but they're the exception, not the rule. In general, both languages can be as efficient as the compiler (or runtime/JIT) allows.
as for which you should use for "general programming", it depends.
Grossly simplified, you might say that:
- C++ is a big, messy and complicated language. It has a lot of useful features, but if you don't really understand what's going on, your program is going to blow up.
- Java is so simplified and barebones that it is 1) impossible to really screw up, and 2) impossible to actually write expressive code.
Java is widely used in application development, where the main task is to present a nice GUI to the user. C++ is often used in high-performance computing, in games (where performance is important, and the developers are conservative and 10-15 behind the rest of the industry), and in big legacy apps.
Ideally, you should know both.
Java is probably going to be most useful if you just want results. If you already knew C++ really well, your productivity wouldn't be too bad. But as a beginning C++ programmer, you'll be spending a lot of time debugging and trying to figure out why your code doesn't do what you thought it'd do.
But most people are going to be more productive in Java.
However, I'd say that C++ is by far a more interesting language to learn. There are more interesting features and ideas in it, there are more things which, once you learn them, you just can't live without. And more concepts that are actually worth learning about, and which will make you a better programmer.
But of course, there are many other options.
If productivity in general apps is your goal, I'd go with Python, not Java.
And if expanding your horizons, and becoming a better programmer is your goal, I'd go with Haskell before C++. Or Scheme. Or Prolog.
Both C++ and Java are, in different ways, showing their age. Java is just embarassingly old-fashioned, clumsy and verbose. Modern languages allow far more concise and expressive code.
C++ is a mess of old and new ideas (but at least the new ideas are in there, unlike in Java), its compilation model is ridiculously inefficient, complicated and error-prone. It's hard to use and the compiler does almost nothing to ensure that your code is correct.
There are plenty of languages to learn. These two old dinosaurs don't have to be your first choices.