Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java or C++?

Status
Not open for further replies.

jgpasko

Programmer
Dec 6, 2001
48
US
Hi,

If someone where to pursue and OO Language, would you recommend Java or C++ as a start?

Thanks John Pasko
john@rts-sd.com
"No matter where you go, there you are."
 
You'll find java easier to learn than C++. Java is like a simplified version of C++.
However, Java is still relatively slow and is mainly used in web applications.
Also, C++ is FAR FAR more powerful than java still and would be the best choice for anyone hoping to put together professional programs.

This being said, C/C++ is a great language which anyone could begin to pick up more or less straight away. You can get free C++ compilers off the web if you'd like to tinker around with samples from books, etc. (look for DevC++ from Bloodshed Software).

Recommended book for starters in C++ is C++ for Dummies by Stephen Randy Davis.
You could pick up a copy really cheap off ebay.com or similar auction type web site.

This book will take you step by step through the basics of C++. Starting with the easy stuff (such as data types, functions, looping, etc) and then building on that knowledge to eventually teach you about pointers and linked lists, etc.

Hope this helps!
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Hi,

OO programming isn't just about the language used, it's a way of life, a discipline. Any one can pick up a Java or a C++ complier and knock out an application, but it doesn't mean that the program is OO.

If you're serious about going the OO route then I'd suggest that you adopt C++ as your prefered langauge, not that I'm biased. But having used both in a serious manner, Java would not be my first choice, for any serious program.

So choose a compiler that meets your needs and armed with that buy yourself a copy of Bajarne Stroustrup's book "The C++ Programming Language" this is (IMHO) probably the best book I've ever read on the subject, and if anyone knows how to implement C++ properly is the founding father himself.

HTH
--
William
Software Engineer
ICQ No. 56047340
 
I've heard a lot of people say that C++ is more powerful than Java, but I was wondering how it is more powerful? What are the advantages of C++?

Also, Gednick, if you think you can find stuff for cheap on E-Bay, you HAVE to check out Half.com. I found several of my books there, and they typically sell for less than auction prices I've tracked (not to mention you don't have to lose hairs worrying about bidding like on E-Bay!).
 
Thanks for your responses and the reading list.

Take Care, John Pasko
john@rts-sd.com
"No matter where you go, there you are."
 
I found that learning C++ was a great foundation which makes learning new languages (especially OOP languages) straightforward. I learned Java after I learned C++ and found it quite a breeze to pick up. I must say that for developing GUIs I found Java much easier plus Java has "garbage collection" which means you don't have to de-allocate memory as in C++, plus the use of pointers in Java is kept hidden from the user which also makes life easier. Clive [infinity]
 
Hi BoulderBum... yes!! I got my first ever copy Visual C++ off half.com for $50 - I later sold that one on ebay.com for $75 [rofl2]
Actually I've done so much with both of these sites (buying and selling). I've bought $50 books for $4, full computer systems for $10 (abeit old ones - but useful for testing backwards compatibility for projects).

Anyway, back to the subject of C++ over Java. William hit the nail on the head when he stated that if he was going to produce a "serious" application he would use C++ rather than Java. I once wrote an entire app in Java complete with fancy graphics, etc. In the end, I ended up writing the whole dang thing again in C++.. why?? Because it was slo PLUS there wwere some things that I didn't feel I had full control over. C++ may be slightly harder to learn than Java but it DOES give you more control over some things. Java users may be shielded from things such as pointers but C++ users have the full power of pointers at their disposal. I also don't like the way Java forces you to stash all member functions within the class declaration - it can get messy (from a visual point of view).
Java does have many plus points. It can be run on any platform (with JavaVM). It has some nice built-in features and classes which are simple to use. BUT, at the end of the day, if I was going to write a serious program, it'd have to be C/C++ route.

:)
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
I see. Thanks, guys!

I think I like Java just because Microsoft hates it.
 
[rofl2] he he, good one BoulderBum!
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Hey BoulderBum, Here you are again with uncanny sense of humor.

Please pass the Java!

Norm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top