Either. Both.
It depends on what sort of projects you would like to do and what sort of libraries various languages offer you that help you with your projects.
C++ can be pretty fast, but you have to be mindful of memory management.
Java has garbage collection, so less memory management is needed.