C++ or Java?Which is better to learn for a newbie to start with?
20 Replies - 3706 Views - Last Post: 04 August 2007 - 08:38 AM
#1
C++ or Java?
Posted 11 July 2007 - 03:58 PM
Replies To: C++ or Java?
#2
Re: C++ or Java?
Posted 11 July 2007 - 04:40 PM
Search the forum here for the several discussions on the same topic - you can judge based on what others have said. I'd say learn c++ first of you find java difficult, but a java first programming would likely tell you different!
#3
Re: C++ or Java?
Posted 11 July 2007 - 07:17 PM
I wouldn't really say that Java is an easier language to learn. However, it is way more cross-platform. With C++ or C not only is the syntax a little different for every operating system, it also differs from one compiler to the next. Visual C++, Borland, and Dev/GCC all have differences in their syntax. Java is the same no matter what compiler. It also is the same whether your writing for Windoze, Mac, Linux, or a Cell Phone.
Not to bad mouth C/C++. You can write an Operating System with these. This is about the only thing Java can't do. It also has inline-assembly. But I wouldn't say it's any easier.
Practice makes perfect. I remember the day when html was a baffling idea. Keep it up and you'll be laughing at the day you wrote this.
This post has been edited by Israel: 11 July 2007 - 07:18 PM
#4
Re: C++ or Java?
Posted 12 July 2007 - 07:50 AM
And Featured. Good topic.
#5
Re: C++ or Java?
Posted 12 July 2007 - 08:13 AM
Israel, on 11 Jul, 2007 - 10:17 PM, said:
Not to bad mouth C/C++. You can write an Operating System with these. This is about the only thing Java can't do. It also has inline-assembly. But I wouldn't say it's any easier.
C+, when written properly complying to ANSI standards, is completely cross platform. That being said, there are certainly components that are platform specific should you choose to use them - they can be necessary for certain types of applications, and in that manner, java can be more effective.
#6
Re: C++ or Java?
Posted 12 July 2007 - 09:07 AM
I think easier is a very subjective term. You shouldn't be worrying about which is easier to learn. You should be worrying about what you're ultimately going to use the language for.
If you're going to write client side scripts for the internet, then you want Java.
If you want to write applications, you can use either. It's been my experience that the development time on Java is faster, but the resulting program is slower. In C++, the development time is longer, but the resulting program is faster.
So if you were writing, say a 3d game or a large application, then C++ is the way to go. If you were writing a small app or an applet, Java is the way to go.
#7
Re: C++ or Java?
Posted 12 July 2007 - 10:17 AM
#8
Re: C++ or Java?
Posted 12 July 2007 - 10:21 AM
This post has been edited by static-dragon: 12 July 2007 - 10:22 AM
#9
Re: C++ or Java?
Posted 13 July 2007 - 01:11 PM
OK enough with the rant, on to the fact of the matter. Here are a couple good questions to ask yourself.
How do you see the world you live in? Do you process information by categorizing and grouping or do you tend to process information sequentially and in a pre-determined order? If you like grouping things together OO (Object Orientated) programming will make more sense to you and Java may be the best choice for you. Although C++ is also OO it functions sequentially as well, Java just makes a little more sense when starting out.
Why do you want to learn to program, is it for a job? If so what language is most commonly used in the filed you’re interested in. Geography plays a big part as well. Where I live there is a big demand for experienced J2EE programmers but you hardly ever see a job posting for a C++ programmer. In San Fran you may be better off knowing C++ cause there a about a Bajillion game development companies out there.
Do you want to program the Next-Gen MMORPG in your spare time? If this is the case I hope you plan on living for a really, really, really, ridiculously long time.
All in all, I think it depends primarily on what you want write code for that will determine what language you start learning from. If you want my humble opinion well here it is. Go with C++, in my brief existence on this floating rock I’ve learned one great life lesson. The more difficult tasks are often the most rewarding (and you can quote me on that).
Also keep in mind that fundamentally most of the different languages out there are very similar. You’re going to have data structures, control statements, methods, etc. in almost every language. So once you learn the basics it’s easier to pick up new languages, you simply have to learn the nuances.
Hope this helps.
This post has been edited by xerxes333: 13 July 2007 - 01:25 PM
#10
Re: C++ or Java?
Posted 16 July 2007 - 12:19 AM
#11
Re: C++ or Java?
Posted 17 July 2007 - 09:58 AM
bernard.assaf, on 16 Jul, 2007 - 12:19 AM, said:
Now maybe it's just a matter of wording but OOP is present in C++ very much so. Only because Java is a completely OO language that doesn't imply that OOP is not present in C++.
bernard.assaf, on 16 Jul, 2007 - 12:19 AM, said:
Now for me there is a difference between C and C++.
For the complete beginners I would say C++ first then Java. I'm just a student and I think it's the more natural way well at least was for me.
#12
Re: C++ or Java?
Posted 17 July 2007 - 10:35 AM
PennyBoki, on 17 Jul, 2007 - 12:58 PM, said:
Agreed. When I write in C++, I write OOP code almost exclusively. I vary rarely write functions. I write methods. I don't create structures. I create classes (though to be specific - in C++ structs are classes where the default membership is public rather than private). Yes, you can go outside the OOP framework in C++, and you can't do that in Java. But C++ is definitely an OOP language. It just doesn't force you into that framework.
And in some ways, I think, that gives C++ more power. I don't have to use the OOP framework to create simple things, like say, a recursive factorial function or some other trivial code. But I could, if I really wanted to.
#13
Re: C++ or Java?
Posted 17 July 2007 - 12:02 PM
C++ provides as much OOP capability as java, it's simply that java enforces it, while C++ does not.
#14
Re: C++ or Java?
Posted 22 July 2007 - 10:30 PM
|
|

New Topic/Question
Reply



MultiQuote












|