Having spent a year in C++, a semester in Java (Spring 2010 - this last one), and learning Python mostly on my own throughout, and brief collisions, I'll give you an analysis of my experiences, along with my own opinions. I won't bother further addressing the silly comment that indicates how little you should pay attention to that professor (although he may be perfectly competent and amazing elsewhere).
C++
An old language, with tons and tons of documentation, most of it useless. This is just about the best reference that I've come across on the internet. The best thing that you can possibly learn from C++ is pointers. If you don't understand pointers, you don't understand computers. They feel really simple to me, but apparently tons of people have problems with them. Of course I also spent a few hours playing with them to really understand the difference between &
, *
, and []
. It's been a few years now, and I've kinda forgot most of the implementation details, but the understanding never leaves.
Other than pointers, C++ objects kinda suck, the namespaces kinda suck, and the standard libs aren't anywhere close to as awesome as Python. Pointers (and manual memory management) are the only things that you can learn in C++ (that I know of), that you can't learn in Python.
Assembly
My favorite other language. You really learn how the computer works at a hardware level. You learn how your data structures (more or less) are implemented - things like strings, etc.
Assembly is so very very basic, but you really learn about what your computer is doing when you type x += 3
.
I loved Assembly - it was one of the best languages I've learned so far, and I learned a lot about the basic stuff. There's not a lot more I can say about it because I didn't learn any abstract ideas or concepts - it was a bit like working on a car and then taking physics and chemistry courses. It may not help much in the way of putting a carburetor back together, but you really understand why that particular gear ratio allows you to get up and go.
C
I've only had the teeniest exposure to this language, and honestly I'd probably recommend learning this rather than C++. Why? Because even though C++ gives you higher level features, you won't get any benefit because they're simply less powerful versions of Python types. At the best you might get some speed from C++, but you can get that same speed from C, and C gives you a good intermediate step between Assembly and C++. I may have to go teach myself C sometime soon - especially if I have any (hahah!) free time this next semester.
Java
I saved the best worst for last. I know there are tons of Java fans out there (my brother is one), but honestly I don't get it. I went into this class expecting to learn something and all I learned was syntax! Oh I guess I learned some of their toolkits, but that was literally it - syntax. I think this quote by sums up my experience and feelings:
I spent several months programming in Java. Contrary to its authors prediction, it did not grow on me. I did not find any new insights - for the first time in my life programming in a new language did not bring me new insights. It keeps all the stuff that I never use in C++ - inheritance, virtuals - OO gook - and removes the stuff that I find useful. It might be successful - after all, MS DOS was - and it might be a profitable thing for all your readers to learn Java, but it has no intellectual value whatsoever. Look at their implementation of hash tables. Look at the sorting routines that come with their "cool" sorting applet. Try to use AWT. The best way to judge a language is to look at the code written by its proponents. "Radix enim omnium malorum est cupiditas" - and Java is clearly an example of a money oriented programming (MOP). As the chief proponent of Java at SGI told me: "Alex, you have to go where the money is." But I do not particularly want to go where the money is - it usually does not smell nice there.
-A. Stepanov
That's quite how I felt, too.
Summary
You should learn a new, lower level language that teaches you something new and gives you something that Python can't. Java won't (compiled to byte-code is not giving YOU something, it's giving the computer something). If you have the choice I would 100% recommend C - it's closer to Assembly and so it offers two things: Speed, and a greater comprehension of what's really going on "under the hood", so to speak. If you have the chance I'd also recommend taking an Assembly class. If you can't choose C, then go with C++ because even if you aren't quite as low level as C, you're 100x better than Java because you'll actually learn something new. You can pick up syntax in a week, but a true understanding of a computer really needs lower level comprehension. And as an added bonus, if you learn C or C++ you can easily extend Python, whee!
(Also, if your professor continues to make fallacious statements like that, and if they don't offer REAL courses like Assembly and C/C++, I might look for a new university).