It depends on your personality. I figure that after learning C++ you're likely to have more of an idea of what is really going on in your computer program than you are with Java. Since I was uncomfortable without that knowledge, C++ was a better match for me than Java could have been.

(I presume that eventually you'll end up knowing both the languages anyway, so I'm ignoring any end benefits that the languages have.)

Java is a great language. If I were to chose between programming in Java or C++ (while ignoring what the final product has to be), I would chose Java. I just like the programming model and structure better. However, Java is a completely different programming model than C++ and not every programmer fully understands it (every Java professor I had used it like C++ while obeying Java's rules). Furthermore, C++ programs easily compile to machine code while Java programs can't without special compilers.

C++ has many nuances and difficulties that are very hard to understand and work with, but you don't have to use these hard-to-understand-concepts until you are ready for them. Whereas you might have 30 "what's this" type questions in order to fully understand a simple "Hello, world!" Java program, you will only have about 3-5 similar questions with a simple "Hello, world!" C++ program. Knowing that you can more easily develop your understanding of C++ with small, incremental building blocks than you can in Java, I'd have a hard time recommending Java as a starting language over C++.

It is interesting to me that so many universities use Java as a starting language. The only reasoning that I can come up with for this is that Computer Scientists see Object-Oriented Programming as the future and want to ensure that the new programmers learn to think in OOP-based designs before they start thinking in procedural-based designs.

FYI: C++ is C (procedural only) with some enhancements and OOP abilities. Java was developed to be purely OOP.

so as far as whats easyest to learn would you still go with c++

I have been looking around in the job field, and I have yet to come across anyone who would want people who know JAVA rather than C/C++. Of course, I'm not interested in developing online applications, so that may be part of it.

That is just one person's experience, though.

so as far as whats easyest to learn would you still go with c++

If you want to take the easy way out watch TV. Otherwise, do which will benefit you more. As far as I know, most companies would require you to know both - meaning it doesn't matter what you start with.

Java is not purely OOP. It has primitives. (But still a good post, thanks.)

Good point. I hinted at it with my "... was developed to be ...", but I was not explicit. Sun decided that it would be too hard a transition to force a pure OOP model, so they broke some of the OOP rules to aid in luring C coders.

This article has been dead for over six months. Start a new discussion instead.