Question Locked

C++ or java

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
This fall I will have the option of taking either C++ or Java. I plan on taking both, but I would like some guidance from actual programmers on which one they feel I should start with first. Thank you.

11 replies

by m61

c++ and java are similar syntactically, but structurally they are quite different

in my schooling i learned c++ before i learned java and had no problems what so ever, the one thing that is the hardest to pick up is HOW to program (function layout, cleanliness of code, commenting, ect), after than learning any language is super super easy as the majority of the new language is syntax

by jaqui

is which one is more in demand for employment purposes?

that one, currently, is java.
[ despite the serious flaws in the java environment, it is the most popular option for commercial software houses, has been for a while, and doesn't show any indication that it will drop any time soon. ]

by tony hopkinson

C++ first.

Java might be an 'easier' start but that's because it's a higher level more abstract language.

In other words, some of the fundamentals are hidden. Some would say because they are, you don't need to know them. A problematic superstition at best, besides you will need to know them for C++.

Think of it like this, if you wanted to be a cabinet maker, in which order would learn carpentry and how to assemble a flat pack....

The difference isn't that extreme, but it is there.

by dawgit

C, then C++, then Java, then C# (if necessary)

Good to know languages of course; Perl, Python, Lisp.

my 2 ?? -d

by leon.honore

Java is an object oriented programming language for it works with classes. Basically, it's a bit hard if it's your first programming language.
C++ is a procedure oriented language which is a lot easier for fresh students :)

by bluechimera

Are you planning to write mostly user-oriented apps or do you plan to get into system level programming?

Have you taken classes dealing with system architecture or done any assembler programming? If so, C and C++ will get you closer to the OS and help you to program on a systems level better than Java.

If you are not as concerned about that aspect right now or are new to programming I think you will find Java will be easier to learn. The syntax of C and C++ can be confusing for a person relatively new to programming (a lot of people have trouble with pointers at first).

Either way, you will need them both.

by antonyr

Java is quiet an easy language and you can do so much you can ever imagine. You just don't get bogged down by learning C++. It seems you are going to learn in the near future. why not start now? would you like to be confused with things that are not required for you to use when you are using java.
You can learn java while having a beer man :)

by rockrep

C++ is a mess. They took C, which was clean, and tried to make it object-oriented, and just made a mess of it, particularly when they extended it to COM and DCOM.

Java is much more cohesive. You'll be more productive over a wider variety of tasks with java than with C++.

Hopefully your teacher doesn't teach java as a Swing-only GUI language which misses the whole point about server-side Java technologies.

I would recommend C and Ruby as well. You gotta have C.

by paul

As you can tell there really isn't a consensus one way or the other.

On one hand C++ teaches good fundamentals that are sometimes difficult to understand but having that base to build on can help later on. But I agree that Java would probably be easier to learn and more rewarding since you would be able to create applications sooner.

I would probably take the class that would fit nicer into my schedule :).

by ajinini

I have taught both for many years. If you must learn both, then do C++ first. Learning the fundamentals of programming is easier with C++! However, if you do not, then take java course and then advanced java if available. This way you can get deeper in the language where there is a lot to learn (i.e. network programming, GUI or Visual programming, mobile computing, concurrent/Parallel Programming etc). Be aware that most the stuff (syntactically) you learn in C++ will be repeated in Java!

This discussion is closed to new replies.