C++ vs. Java

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Rayden

Senior member
Jun 25, 2001
790
1
0
Most universities are now using Java to teach object orientation. My school does this. After three classes they ditch Java though. They expect you to learn C on your own pretty much. Although they teach it a little bit in OS.

I would recommend Java. You will be able to learn about programming without having to deal with memory management. Also Java documentation is infinitely superior to C/C++.
 
Sep 29, 2004
18,656
67
91
Originally posted by: EvilManagedCare
Which would be better to learn first? Would there even be a benefit from learning one before he other?

Thanks in advance

Java makes learning software easier.

C++ requires more code to do the same thing and essentially makes you learn things at a levvel closer to the OS.

I :heart) java
 
Sep 29, 2004
18,656
67
91
Originally posted by: Rayden
Most universities are now using Java to teach object orientation. My school does this. After three classes they ditch Java though. They expect you to learn C on your own pretty much. Although they teach it a little bit in OS.

I would recommend Java. You will be able to learn about programming without having to deal with memory management. Also Java documentation is infinitely superior to C/C++.

If you want to learn about software, use C++
Want to learn to program, use Java?

Fair statement?
 

Rayden

Senior member
Jun 25, 2001
790
1
0
Originally posted by: IHateMyJob2004
Originally posted by: Rayden
Most universities are now using Java to teach object orientation. My school does this. After three classes they ditch Java though. They expect you to learn C on your own pretty much. Although they teach it a little bit in OS.

I would recommend Java. You will be able to learn about programming without having to deal with memory management. Also Java documentation is infinitely superior to C/C++.

If you want to learn about software, use C++
Want to learn to program, use Java?

Fair statement?


I would say that is fairly accurate. I would argue that from a computer science stand point, Java is better for learning object orietation, while C++ is better for learning about memory management and low level algorithms.

As far as developing applications go, anything serious should not be done in Java, though there are a significant number of good applications made in Java.
 
Sep 29, 2004
18,656
67
91
Originally posted by: Rayden
Originally posted by: IHateMyJob2004
Originally posted by: Rayden
Most universities are now using Java to teach object orientation. My school does this. After three classes they ditch Java though. They expect you to learn C on your own pretty much. Although they teach it a little bit in OS.

I would recommend Java. You will be able to learn about programming without having to deal with memory management. Also Java documentation is infinitely superior to C/C++.

If you want to learn about software, use C++
Want to learn to program, use Java?

Fair statement?


I would say that is fairly accurate. I would argue that from a computer science stand point, Java is better for learning object orietation, while C++ is better for learning about memory management and low level algorithms.

As far as developing applications go, anything serious should not be done in Java, though there are a significant number of good applications made in Java.

Regarding boldface. I was thinking the same exact thing. in C/C++, you write your own linked lists. In java, you just use the LinkedList class. Not to say you couldn't hand code a linked list in java, just that you never would.

I guess my point is that, you really need to learn algorithms for optimization and if you learn with C/C++, you will learn those concepts much better. Knowing what something can do and knowing in depth how it works are two different things.

Actually Java is taking some serious strides. It will be in real time embedded ssytems in 2 years. I can almost gaurentee it. Some work has been done on garbage collection that is simply incredible.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
in C/C++, you write your own linked lists. In java, you just use the LinkedList class.

Well, to be fair, nobody has to write linked lists in C++ anymore unless they want to, or their comp sci prof says they have to. STL, ATL, and MFC provide just about all the utility classes you could want to do everything from basic containers all the way to COM and GUI apps.
 

Red and black

Member
Apr 14, 2005
152
0
0
Originally posted by: IHateMyJob2004
in C/C++, you write your own linked lists. In java, you just use the LinkedList class.

This is the sort of sloppy thinking that results from using sloppy terms like "C/C++".

Once again: there is no language "C/C++". There is C, and there is C++, each of which have variations.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: Einstein Element
Originally posted by: Markbnj
I haven't heard anything about VB.NET- anyone here prefer it to java/c#?

Different animal. Sort of halfway between java and javascript. Great for whipping out quick windows apps, or writing frameworks to run controls written in C++/C#.


Oh I see. thanks.

This is not true. VB.NET gained OO features that previous versions of VB lacked. While I prefer C#, you can do almost everything in VB.NET as well.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
This is not true. VB.NET gained OO features that previous versions of VB lacked. While I prefer C#, you can do almost everything in VB.NET as well.

Where in my post did I say VB doesn't have OO features, or that you can't do anything with it? The post was about syntactic complexity and ease of learning, not capability and flexibility.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
i admit you didn't say that it lacked OO features. but you positioned it as whipping out quick windows apps or using controls that were written in c++ or c#. if you're going to write a control in c#, there's no reason you can't do it in vb.net as well.

do you believe there is something that you should write in c# over vb.net?
 

mikester

Member
Aug 8, 2005
59
0
0
Originally posted by: Rayden
As far as developing applications go, anything serious should not be done in Java, though there are a significant number of good applications made in Java.

Really? One could argue that anything that is restricted to only running on a Wintel platform (i.e. .NET) isn't a "serious" application.

It all comes down to using the right tool for the job. If you are writing a device driver or a game then it doesn't make much sense to use anything but C (even C++ in these circumstances is questionable). If you are writing an enterprise server application, I pity the people who are tied to the .NET platform. Been there, done that - will never do it again without Java.

BTW, I'm not a Java fanboy here - I spent the first 7 years of my professional career programming in C/C++ for the Windows platform. The past 6 years of my career have been spent as a J2EE architect. I have one application that runs (very well) on Windows, iSeries (AS/400), and OS/390 with no code changes. When the .NET guys can do that, then I'll be impressed.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
but you positioned it as whipping out quick windows apps or using controls that were written in c++ or c#

No, actually, I just said it was great for that purpose. Which it is. The answer to your other question is: no, not really. You can do almost anything you want to in VB. For myself I still prefer to write com controls in C++, just because they are smaller and faster.
 

imported_Rampage

Senior member
Jun 6, 2005
935
0
0
I am not a programmer. But at my work I do handle the light work.

I dont see any Java at my corporation, its all MS. All our apps that are custom built for the office are done in VB.net.
It does everything we need with the SQL server and handles all the tasks efficiently.

The only java related stuff I've even seen here is the light javascript used for webpages. Other than that, Microsoft seems to dominate here.

I have decided to stick with VB8 and MS WebDev and forgo any other languages.
Unless I decide to program my own Photoshop application or Quake 5, I think I will be ok.

You are still the hero in the office if you can create small apps that get tedious jobs done quicker with VB vs java. And its much easier to learn.
My company doesnt give us dedicated Computer Science people to rely on, we pretty much figure it out ourselves. We have hundreds of CS people in the corporation, but they are a PITA to get ahold of and deal with.

I decided back in HS after taking programming overview classes that C++/Java ect were not what I wanted to do for a living.

As I continue to learn more about VB8+WebDev, they will add to my spanish speaking skills+my knowledge of my own industry make me a valuable asset in my own right.

I would like to program a graphical adventure game (like Kings Quest) someday though.. thats one of my dreams... will have to stick with old SGI or some other engine though, probalby will never be able to create the vision I have inside my head and have the graphics/physics that I want.

I heart VB, and would recommend it to the OP unless you plan on being a dedicated programmer and want to create Quake 5 or Photoshop 9 (or some other powerful app).

I'm not a fan of Java though, I like John Carmacks quote on Java:
Originally posted by: John Carmack
Write-once-run-anywhere. Ha. Hahahahaha. We are only testing on four platforms right now, and not a single pair has the exact same quirks. All the commercial games are tweaked and compiled individually for each (often 100+) platform. Portability is not a justification for the awful performance.
 
Jun 6, 2005
194
0
0
i'd probably choose to work with C++ if possible. Java will spoil you and you will have a harder time understanding pointers, and there's more memory management in C++ since there's no garbage collector in C++. i too have problems with pointers in C++, i understand the concept but i keep forgetting when to use the * and not
 

Atheus

Diamond Member
Jun 7, 2005
7,313
2
0
Originally posted by: John Carmack
Write-once-run-anywhere. Ha. Hahahahaha. We are only testing on four platforms right now, and not a single pair has the exact same quirks. All the commercial games are tweaked and compiled individually for each (often 100+) platform. Portability is not a justification for the awful performance.

Ha! whatever, since when does carmack write game code for phones? cos that's the only market that has 100+ platforms to target, and even then it's debatable. I'd like to see him port 5000 lines of C to just 2 or 3 platforms, I'll port 5000 lines of java, and we'll see who finishes first.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'd like to see him port 5000 lines of C to just 2 or 3 platforms, I'll port 5000 lines of java, and we'll see who finishes first.

Considering that his C compiles and runs fine in Linux and Windows and those are about as different as you can get without including odd OSes like VMS, I'd say he'd finish first. Then throw in a need for your Java program to live beside 3 or 4 other Java programs that all require different versions of JVMs and see who has an easier time.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Red and black
The only reason to learn C++ or Java would be for a programming job.
Well put. That said, the majority of times that someone learns to program, it's so they can get a job
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well put. That said, the majority of times that someone learns to program, it's so they can get a job

That's not necessarily true, there are a lot of OSS developers that work for free or now get paid to do what they used to do for free.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
Well put. That said, the majority of times that someone learns to program, it's so they can get a job

That's not necessarily true, there are a lot of OSS developers that work for free or now get paid to do what they used to do for free.
Any guesses on how many of those there are, vs how many who do it the boring way? Probably a good number of those open source developers starting working for pay and did os in their spare time.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Any guesses on how many of those there are, vs how many who do it the boring way? Probably a good number of those open source developers starting working for pay and did os in their spare time.

I would say that those that did programming both as a job and as a hobby in the beginning don't count either because they obviously enjoy it and would have done it whether they found the programming job or not.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |