Java or C++ for university CS courses

ceducationjava

I'm in the throes of getting myself enrolled in school to get a CS degree. The school I am looking at actually offers both Java- and C++-based for the introductory software development courses (object-oriented programming, design patterns, that sort of thing). It is student's choice which track to follow, but there is only time to follow one.

Knowing what you know now, if you had the choice, would you lay down your CS curriculum foundation in Java or C++?

My current debate currently looks like this:

A good friend (who has a PhD in AI) is touting Java as the better choice regardless of what I do, if only to open up more job opportunities later, though he might be biased since all of his work has been in Java (he loves it). I live in the Boston, MA, USA area and I see an equal amount of Java and C work.

On the flip side, although I haven't entirely yet settled on what I want to do with the degree when I'm done, my preference would be to develop for the Mac, which I am doing now albeit in a limited capacity. To that end, I'm getting some limited exposure to C++ already, but I've had none with Java, and looking at my projects at my day job I don't see a need to use it anytime soon, "soon" measured by at least two years.

I probably should note that I'm an adult going back to school after 20 years (I currently have no degree of any kind) so I'm looking to maximize the opportunity and time spent as best I can. I'm kind of leaning towards C++ but I'm still ambivalent, and some outside, objective advice would help here.

Or I could just be thinking too hard about it.

UPDATE: It turns out the language selection wasn't so clear cut as I originally surmised. While a couple of core courses focused on Java, some of the other core courses work in primarily C and Java, but also a few others thrown in for good measure. In fact, my rest of my semester is going to be in Objective-C after spending time in Java and Javascript. Last semester was C, Javascript, and PHP, plus a few others thrown in as assignments required. Since things were pretty much split down the middle overall, and I am still getting answers to this, I am now trying to work my curriculum such that I meet all of the requirements for the degree but to absorb as many languages as I can reasonably handle. So far, my grades have not suffered trying to do this.

Best Answer

I'd personally go with C++ as it will give you insights into how parts of Java work under the hood (Pointers for example). Moving to Java from C++ is fairly trivial, whereas moving the other way around is arguably more difficult.

The truly difficult thing about the Java eco-system is it's vast number of frameworks, libraries etc - they're unlikely to cover all of that at University anyhow.

At the end of the day it's not going to matter that much what language you choose, as long as you learn the principles.

My JUG is going to kill me for endorsing C++ ;-)