There are a whole raft of different languages, stuff like PHP, Ruby, Python, Perl, even Bash scripting, and load of others. If you had a general grounding in several, you can select the best language for any given task.
If you've no experience of programming languages, then you might want to start at C, which brings in constructs and mechanisms that are used in both the others you mention, C++ and Java. If you are already familiar with programming languages, then either of these others would be good. My personal choice would be for C++, I'm not a fan of Java as my experience of it is that it produces slow and ugly applications (we use both Java and C++ in my work) but you might find your experience of it works out differently.