>If I were to make a career out of computer programming,
>which would be better to learn, Java or C/C++?
If you don't know C, I wouldn't hire you. Period. If you don't know Java or C++, whether I would hire you or not depends on the job. However, I would recommend learning all three, starting with C, then moving to C++, and finally Java.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>I know some C/C++ right now, and no Java.
Let me clear this up for you right now. C/C++ is for experts only. C and C++ are two different languages and you would be wise to learn only one at a time. When people say C/C++, they mean some combination of C and C++ that can only be correctly written by someone proficient in both.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>learning both C and C++ is good but you may find yourself
>trying to unteach yourself things from C when you work in C++.
Yes, just like when you learn C++ and Java, C and C#, Java and Fortran, Perl and Python, LISP and Forth... Pick any combination of languages and your statement is absolutely true. So did you have a point or are you simply trying to propagate the usual C/C++ myths?
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
The differences between java and c++
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
You may opt for Java because its a new language that is yet to be developed instead of C or C++ . The latter have become full fledged,vast. There are thousands of sites which use java applets. Java is currently very popular , much more than the others.
For me Java was really easy to learn than C++. It had so nice sorting techniques , so lucid for anyone in my small view.:)
hinduengg
Junior Poster in Training
88 posts since Jun 2007
Reputation Points: 36
Solved Threads: 4
>there are deffinate uses for both C and C++ but it is
>not necesarily true that one should learn C prior to C++
Where did that come from? I wasn't talking about which one to learn first, I was talking about your magic comparison of two different languages that somehow makes sense to you but not in reality. Of course you would have to be careful not to mix in C styles when working with C++, just as you would have to be careful not to mix C styles when working with Java. That's what I was talking about.
>what is so special about it that someone cant just learn
>c++ and use it for situations that also calls for C?
C is available on more platforms than C++, so if you work on one of them you have no choice. There's more C code than C++ code out there, and you can expect to be asked to work with some of it. C is considered the base language that every programmer should know. C++, Java, C#, Perl, and the majority of the mainstream languages are based off of C. If you know C, you have insight into why those languages are the way they are. And most importantly, programming culture has grown to expect you to recognize and read C to some extent. It's much like the pseudo code used in technical papers. You're simply expected to know it, and if you don't, you're only hurting yourself.
>am i correct to assume that C can do things such as send a group of
>bites to lets say a printer port or a graphics card but that C++ cannot
>do that directly?
No, C++ can work at the same low level as C.
>i originally thought that C was an outdated language
Just because it's old doesn't mean it's outdated.
>and that C++ can do everything that it can do plus it can do object oriented as well
Keep in mind that object oriented programming doesn't have to be supported directly by language features. Most of the guidelines in OOP can be followed in C with minimal effort. The rest can be simulated.
>i just thought that learning C would be a waste of
>time since C++ includes C functionality as well.
Learning a new language is never a waste of time.
>but that still does not explain why she would not hire someone who dont know C?
That's simple. If someone doesn't know C, that's a good indication that he lacks the experience, drive, and foresight that I look for in exceptional programmers. If someone doesn't know C, the only way he can claim to have worked low level enough to do the jobs I hire for is to know assembly. If he knows assembly but not C, that's a huge red flag because it suggests he's either quite the beginner, or he's too dogmatic about assembly to be of any real use as a professional developer.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
java compilers and the java runtime environment are created using C++
Possibly, but not necessarilly.
You can just as well write a JVM in say Fortran or Assembly.
Or create one in hardware.
Anyway, the language a compiler or operating system is written in is no indication that you should know that language first before you can master the language that compiler compiles.learning both C and C++ is good but you may find yourself trying to unteach yourself things from C when you work in C++.
And the reverse is equally true (though enforced by the compiler).
If you're good enough you recognise the different paradigms and don't mix them without very good cause.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337