Skip to main content
gamedev.net
🔒 Locked

Java and C++

Started by oldmilk 6 replies 900+ views
Original Post
oldmilk
oldmilk
I already know C++ and I''m thinking about learning Java too. Is there anything Java can do better than C++. Is learning Java unnecessary if I already know C++?
Koroljov
Koroljov
Java should be platform independent. But don''t trust that.
Why do my programs never work on other computers?
Linc
Linc
Well, since you already know C++, java isn''t really that hard to pick up, and personally, I never think it''s a bad idea to learn a new language.

As for the stuff java can do better than C++? Basically, there isn''t anything it can do better per se, it is only easier to use since stuff like pointers and garbage collection are done for you. And, as Koroljov said, it is supposed to be platform independent, but it has its own quirks when it comes to that.
Zipster
Zipster
Java is a good language, and if you have the time and resources, then definitely go ahead and learn! It''s not only a fun language, but its extensive API should provide you with hours of fun Especially reflection.

Echoing what everyone else said, if you already know C++, Java should only take you a matter of weeks, or less. There are a few new concepts such as packages and interfaces and whatnot, but nothing steep.
Raghar
Raghar
quote:
"I already know C++ and I''m thinking about learning Java too. Is there anything Java can do better than C++. Is learning Java unnecessary if I already know C++?"

You''d learn better OO, what is multipass compiler, what are multiple entry points (testing and so on), differences between windoze and linux programming, nicer standard library, significantly lower problems with porting.

I could add more, but...

quote:
"As Bjarne Stroustrup writes on his homepage: "Java isn''t platform independent; it is a platform. Like Windows, it is a proprietary commercial platform." "

Isn''t he Open source purist?

As long as Java compiler is free of charge, and JRE as well, independent developers don''t care if is it "commercial" platform or not.
johnnyBravo
johnnyBravo
im learning java at college, basically id use java for business, c++ for games
justo
justo
suggestion: use the search button at the top right of this page. im not being rude; there have been literally hundreds of discussions on this very topic already and they will probably be a much better resource than this thread is shaping up to be.

that said, the more languages the merrier, and java is a great tool, but you might want to focus on one language for now until you start really producing some stuff youre proud of.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.