Question:
I'm considering majoring in computer science. What course should I take first? Java or C++?
1970-01-01 00:00:00 UTC
I'm considering majoring in computer science. What course should I take first? Java or C++?
Eight answers:
TK "Snobol" Erlang
2008-07-04 09:50:12 UTC
Both languages are good. Java will be the easier one to learn first. C++ is pretty cryptic (especially when it comes to pointers). C# is yet another C-based language that would be good to learn.
schuchert
2008-07-03 00:28:24 UTC
I used C++ from 1989 to 1997 and then switched to Java. Here are a few things to consider:



1. Knowing more languages is better than less.

2. C++ is MUCH harder as a language. Java is an easy language but it has a huge library. If you can learn C++, you can learn Java.

3. Java is a significant departure from C++ in that is uses a virtual machine to run its programs. You WILL be using this kind of technology in the future. It's required, so that's not a big deal.



There is a lot of Java and C++ development going on right now. However, C++ is really showing its age. Java is to a lesser extent.



You should not focus on learning one language or one kind of language. If you have the chance to take a programming languages course where you work with several different languages, take it. For example, if you can get a chance to try a functional language (lisp, scheme, fp), do it. Give erlang and scala a try.



Your CS degree should not be based on a programming language. It should be based on principles such as data structures and algorithms, discrete mathematics, operating systems and/or compilers, etc.



You should be looking at mashups and dynamic languages.



Personally I don't like C++. I think it is a language of the past. I know I'll get flamed for saying it. You can do a hell of a lot in the language but it is simply a burden to work with.



I recommend you take a class that teaches some kind of assembly. Make sure you understand FRAMES or ACTIVATION RECORDS - (same idea, different terms) - see if your class teaches you how to write recursive algorithms in assembly using hand-formed frames (you only need to do this once to get a good understanding).



Learn about concurrency versus parallelism. If you get a chance to do multi-core design, take it. That's the future.



UNDERSTAND the following algorithms by the time you are out of your CS degree: producer-consumer, readers-writers, dining philosophers.
tfloto
2008-06-29 19:29:34 UTC
The syntax of both Java and C++ are descendants of the C language. All of these are here to stay. You'll never get the performance out of a Java program that you will out of C++ or C. C and C++ compile to CPU specific Machine instructions. Java compiles to P-Code a virtual machine that still has to interpret to machine code. Don't get me wrong. For many applications Java is excellent and I use it a lot. It runs across Mac, Linux and Windows where C/C++ runs on the type of processor and Operating system it was compiled for. Trade Offs. Which you'll appreciate if you learn them all!
☣irishman76☣
2008-06-29 19:17:12 UTC
Both, C++ is a very good thing to know.
gene_frequency
2008-06-29 19:06:09 UTC
I love C/C++, but rumor is, it's fading. Java is sweeping like wild fire. Now, the syntax is verrrrry similar...so if you do pick C/C++, it won't be time lost or wasted. In fact, I've easily ported useful Java apps into C/C++ for a good executable program. Like wise, learning Java 1st certainly will advance your capability of C/C++ when/if you ever decide to do it. Hope this helps.
Brad
2008-06-29 18:58:59 UTC
Knowing C++ is always helpful, since it's a pretty widely used language. The good news is, there are a lot of similarities between C++ and Java in terms of syntax, so knowing one will help immensely with the other. I say go for it. :)
Michael R
2008-06-29 21:51:18 UTC
I love C/C++, but rumor is, it's fading. Java is sweeping like wild fire. Now, the syntax is very similar...so if you do pick C/C++, it wasted our time. I've easily ported use Java than C/C++ for a good executable program will. Like wise, learning Java 1st certainly will advance your capability of C/C++ when/if you ever decide to do it. Hope this helps.
jeo
2008-06-30 02:06:36 UTC
it is good for u to learn C++ first then java



C++ acts as a foundation for java

It will be easy to learn java if you know any Object oriented programming language


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...