Java vs. C++?

Started by
21 comments, last by anemian 15 years, 5 months ago
My situation: Over the summer I learned a little bit of C++ but then once school started I stopped learning it. I'm in my senior year of high school and next year I go to college. In college I want to major in computer science and become either a game programmer or a software programmer. Now I want to start learning a language again, but I don't know if I should go for Java this time since some say it is easier to grasp the syntax and get all of that down or if I should go C++. I plan on learning them both eventually. What are the pros/cons of learning each language first and which one do you recommend?
Advertisement
Find out what language your college uses for its initial computer science classes. Learn that language.
Quote:Original post by oler1s
Find out what language your college uses for its initial computer science classes. Learn that language.


Indeed.
There's a good chance that your University may start you off on Java.
There is also a good chance that you would find Java an easier language to learn than C++.

In the long term, if you're learning both anyway, then it doesn't matter - you won't be screwed over by learning one of those languages before the other.
Quote:Original post by oler1s
Find out what language your college uses for its initial computer science classes. Learn that language.

Good advice.
Learn one of them, preferably the one you come in contact with later at the university (as mentioned before), but DO NOT stick to just this language. After learning it, have a look at other languages. I'd recommend looking at Python, and trying out stuff that wasnt possible in C++ or Java. For example, try out to code in a functional style in Python. Then, move to something like Haskell. The idea is not to know as many languages as possible (which is useful, but not the primary goal). The idea is to see different perspectives, different ways of solving problems. This greatly enhances your programming skills.
~dv();
I would recommend C++ coz most of the API's are compatible with C++.
For ex Directx doesnt run with java.
If u want to become game programmer go with C++ then learn java.It will be a lot easier.
If you can figure out what language you'll have to use at college/uni that's worth learning obviously.

Otherwise, I'd simply say Java as it's easier to learn good OO programming in that language without getting too bogged down in hardware related details. Certain elements of C++ requires an understanding of what's happening at the machine level (eg. pointers).

Not only that, Java is a leaner language than C++ and does not have one million ways to do the same thing. It's simply easier to write good code for Java.

Edit: Actually, I learnt C++ first (after Basic lol) because Java was so hideously slow back in that time. Would I have to make the same decision today however, I'd go with Java.
if you want to make makes go with c++(every good graphic api is c++) if you want to just do apps and web work go with java (java uses native gui) but java dousent make very great games. Also learn aton of math.
Quote:Original post by Z_of_Thule
if you want to make makes go with c++(every good graphic api is c++)
So what makes the jMonjeyEngine not a good API?

This topic is closed to new replies.

Advertisement