All Forums
 Technology
C++ vs. Java

 Printer Friendly
 
Author Previous Topic Topic Next Topic  
SkazMAO
Infrared Wave


USA
371 Posts
Posted - 02/07/2003 :  17:29:04  Show Profile Send a private Message  Send SkazMAO an instant message
My school has been using C++ for AP Computer Science for about six years. Suddenly this year they switched to Java (actually I think the whole state of New York did). Why is this? Has C++ become to outdated? Is it worth learning anymore?

-skaz

-----------------------------------------------------
Dragonball Z: "The Most Demented, but Amazing Anime of All Time"


Alert Mentor now

D
Micro Wave


USA
131 Posts
Posted - 02/07/2003 :  17:42:53  Show Profile  Send a private Message  Send D an instant message
A bunch of experts got together and decided that object oriented programming was good, so they decided to tell people to use purely object-oriented programming languages. It's been happening for years, so don't be so surprised.

Just keep in mind that C++ is faster than Java. That will make you smile when you build large projects.

"A mathematician is a device for turning coffee into theorems."
- Paul Erdos

Alert Mentor now Go to Top of Page

Greg Bernhardt
Radio Wave


USA
2001 Posts
Posted - 02/07/2003 :  19:58:02  Show Profile  Send a private Message  Visit Greg Bernhardt's Homepage  Send Greg Bernhardt an ICQ Message  Send Greg Bernhardt an instant message
It will be a very long time until C++ is considered outdated. Java is a just a newer OOP with added features to make things easier. Both can do the same things. Java just has the hype. However it seems that in the business market Java programmers have an easier time finding jobs. It's all in what you want to do.

admin@physicsforums.com
http://www.physicspost.com

Alert Mentor now Go to Top of Page

grady
PF Advisor


USA
461 Posts
Posted - 02/07/2003 :  22:29:11  Show Profile  Send a private Message  Visit grady's Homepage
There isn't really any reason to do that. Maybe Sun paid the NY state education officials and now everyone learns Java.

------------------------------

"I want my tail back"
-Grady, on Evolution

Alert Mentor now Go to Top of Page

Audacity Dan
X-Ray Wave


USA
1773 Posts
Posted - 02/08/2003 :  00:49:39  Show Profile  Send a private Message  Send Audacity Dan an ICQ Message  Send Audacity Dan an instant message
When you see Quake, Splinter Cell, and Morrowind made in Java, then C/C++ will be obsolete.

C/C++ is many times faster than Java. Go with Java if you want to be an OO purist. I don't really see the point. Also, Java is compatible on all platforms. This is actually why it is slower. Java code doesn't get compiled into machine language, it gets compiled into a form of data that gets interpreted into machine instructions.
If you want to do web applets, use Java. Java also has better typechecking, which you can view as a blessing or a hassle. Also, with Java, you're going to create more source files, because each class needs its own file, and the file must have the same name as the class.

If you care at all for optimization, C/C++ is better. In fact, the more object-oriented you get, the slower you get. Pure C is faster than C++. The i/o functions for C are multiple times faster than C++'s streams.

-----------------------------------------------------
Should I spend time thinking about what I should spend time thinking about?

Alert Mentor now Go to Top of Page

OH man
Radio Wave


USA
86 Posts
Posted - 02/08/2003 :  01:55:38  Show Profile  Send a private Message  Visit OH man's Homepage  Send OH man an ICQ Message  Send OH man an instant message
Same thing here, I took puter science first year they started doing Java instead of C++ (I live in Illinois, so its not just New York)

Im taking AP Computer Science next year, and it will be Java

Personally, I think Java is just more fun to do, and you can show off your work in a matter of seconds to anybody by uploading it to your website.

This space intentionally left blank.
Dave Groysman


Alert Mentor now Go to Top of Page

STAii
X-Ray Wave


Jordan
1376 Posts
Posted - 02/08/2003 :  14:08:52  Show Profile  Send a private Message
quote:
Originally posted by OH man:
Personally, I think Java is just more fun to do, and you can show off your work in a matter of seconds to anybody by uploading it to your website.


You can do the same with the EXE that you compile on C/C++ (except you have to make sure that the other side's CPU understands the machine language of your CPU (you both have the same type of CPU)).
Of course he will need to download the EXE .


You've gotta be japaneese !

Alert Mentor now Go to Top of Page

OH man
Radio Wave


USA
86 Posts
Posted - 02/08/2003 :  15:41:02  Show Profile  Send a private Message  Visit OH man's Homepage  Send OH man an ICQ Message  Send OH man an instant message
Yea, and I dont kno about u, but I dont go downloading random exe files...
Can a java applet potentialyhurt your computer?

This space intentionally left blank.
Dave Groysman


Alert Mentor now Go to Top of Page

Greg Bernhardt
Radio Wave


USA
2001 Posts
Posted - 02/08/2003 :  16:47:26  Show Profile  Send a private Message  Visit Greg Bernhardt's Homepage  Send Greg Bernhardt an ICQ Message  Send Greg Bernhardt an instant message
quote:
Can a java applet potentialyhurt your computer?

Yes, but it depends on your security settings you have on your browser. If IE detects something that might harm your computer it will ask if you want to run it.

admin@physicsforums.com
http://www.physicspost.com

Alert Mentor now Go to Top of Page

Will
Infrared Wave


USA
302 Posts
Posted - 02/10/2003 :  06:24:53  Show Profile  Send a private Message
thats funny SkazMao my teachers say that Java is becoming out-dated and they are switching next year. I think they are going to switch to teaching .net or something.



Alert Mentor now Go to Top of Page

Greg Bernhardt
Radio Wave


USA
2001 Posts
Posted - 02/10/2003 :  06:39:53  Show Profile  Send a private Message  Visit Greg Bernhardt's Homepage  Send Greg Bernhardt an ICQ Message  Send Greg Bernhardt an instant message
Yep, .Net is the newest technology. Grady and I both make use of it.

admin@physicsforums.com
http://www.physicspost.com

Alert Mentor now Go to Top of Page

Soveraign
Radio Wave


USA
20 Posts
Posted - 02/11/2003 :  21:29:48  Show Profile  Send a private Message
Use the right tool for the right job.

By the time I got my B.S. I knew about 12 languages. It is true that OO is most accepted when it comes to general purpose programming. But, for example, we certainly don't use Java to perform real-time signal processing in radars. Even today, plain old C is quite useful in this area, but the trend is moving towards C++ (for the obvious reasons of the tools it gives you for building large apps).

But just always remember, computer science is not the language you use, it's the principles you apply.



Alert Mentor now Go to Top of Page

C0mmie
Radio Wave


USA
5 Posts
Posted - 02/12/2003 :  02:28:57  Show Profile  Send a private Message
My high school AP Computer Science class is switching to Java next year too. Personally, i dont see the reason for this because C++ seems to be the language best suited for compsci, but I guess Java is easier to learn in some respects.

The great thing is, if you take AP compsci this year and pass the AP test for C++, you cant take the AP thest again next yeat in Java. (correct me if I am wrong on this but its what my teacher told me)



Alert Mentor now Go to Top of Page

nowonmai
Radio Wave


Ireland
26 Posts
Posted - 03/06/2003 :  12:05:05  Show Profile  Send a private Message  Send nowonmai an ICQ Message
.NET is just ActiveX given a new paintjob, hardly the best technology
it's also based on proprietary languages... VB, VC++, C# (wtf??)

JIT compilers are improving Java's effeciency, and dedicated Java machines will do even more for it.

C++ is just a pain in the arse to program in. It gives you enough rope to shoot yourself in the foot, repeatedly. Sure, it's faster, but the bloated run-time libraries with .NET eliminate this advantage... it's hard enough to keep the most basic .EXE below a couple of megs.

if you really *want* to program in C++, use GCC.. at least it's a standard



Alert Mentor now Go to Top of Page

   

 Printer Friendly

 
load time: 0.7354