comp science 1st yr. -- C++ or java ?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

33 Replies - 7403 Views - Last Post: 29 August 2009 - 09:55 PM

#16 computerfox   User is offline

  • straight vegetarian kid

Reputation: 50
  • View blog
  • Posts: 3,772
  • Joined: 29-January 09

Re: comp science 1st yr. -- C++ or java ?

Posted 28 May 2009 - 01:22 PM

to be honest, JAVA is a little bit more confusing to learn as your first language, but once you understand JAVA you can very easily understand C++. like dantheman said, two months is more than enough to learn both, but which to learn first, i'd say C++.

on an educational side, most schools teach C++ first

in general the syntax for both are similar, but JAVA is easier to understand classes with, due to it being OOP. in the end it's your choice which one to learn first, but two months should be more than enough to learn both.

:) hope that helps and all the best!

This post has been edited by computerfox: 28 May 2009 - 01:23 PM

Was This Post Helpful? 0
  • +
  • -

#17 zombie_chan51   User is offline

  • D.I.C Regular

Reputation: 7
  • View blog
  • Posts: 327
  • Joined: 16-March 08

Re: comp science 1st yr. -- C++ or java ?

Posted 01 June 2009 - 09:15 AM

View PostShitij1990, on 23 Apr, 2009 - 06:34 AM, said:

I am doing B.Tech in computer science and I am in the 1st year (I have almost completed 1st year)

I want to learn a language in the forthcoming summer break (2 months) between the first year and second year, and am quite confused if I should go for C++ or Java.
I have no previous experience of C++ (I did not have comp sci in school), but I have studied C in the first year.
I have asked a few people and most of them tell me that trying to learn java is no good if I already dont know C++, because then I will not know what the concept of "classes" is, and therefore will not be able to understand Java properly.

In a nutshell, my questions are-
1. Should I learn Java or C++ ?
2. Should I join a proper institute or buy books and do java/c++ at home??


Well I guess i'll suggest C++, but Java is also useful to learn.
And for your second question, it depends on how you learn. I learn better from visual examples so I would do a proper institute, plus if you have questions they can be answered.
Was This Post Helpful? 0
  • +
  • -

#18 Kanvus   User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 452
  • Joined: 19-February 09

Re: comp science 1st yr. -- C++ or java ?

Posted 05 June 2009 - 02:14 AM

Depends on your personality as an above poster mentioned. Java really does feel like they've stuck you in an indestructible bubble. Some like it, others are claustrophobic. For myself I gave Java a fair chance but just couldn't stand it. It's because I like fast women and rainbow cars--plus C++ is like owning a big violent dog. Some people own huge dogs despite the chance of losing an arm some day. Others value their limbs and go for a kitty that can do everything except tear your limbs off, and it cleans itself constantly so you don't have to.

This post has been edited by Kanvus: 05 June 2009 - 02:15 AM

Was This Post Helpful? 1
  • +
  • -

#19 sbromley   User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 127
  • Joined: 20-May 09

Re: comp science 1st yr. -- C++ or java ?

Posted 05 June 2009 - 11:22 AM

I would say learn c++ first, because then you have a sense of memory management. Where in Java alot of that stuff is done for you and you might end up taking it for granted in other languages.
Was This Post Helpful? 0
  • +
  • -

#20 janotte   User is offline

  • code > sword
  • member icon

Reputation: 991
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: comp science 1st yr. -- C++ or java ?

Posted 07 June 2009 - 03:59 AM

Have you covered pointers in C yet?

If you haven't then I'd suggest keeping on the C/C++ path for now.

Java doesn't do pointers (because of the JVM).

When you learn pointers you understand some of the more important bits of knowledge a programmer should have.

If you have a good understanding of pointers then I'd say the choice is not that important. It's a vanilla vs chocolate choice. They are both good. If you are get stuck making a decision after a week or so just toss a coin and go with that result. You'll learn heaps from either and if you are at all serious you will learn both in the next few years anyway so which one happens first is not as important as just keeping the learning momentum going.

Happy coding with whatever choice you make and hope to see you participating on the relevant DIC boards with whatever choice you make.
Was This Post Helpful? 0
  • +
  • -

#21 jcmaster2   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 183
  • Joined: 27-April 09

Re: comp science 1st yr. -- C++ or java ?

Posted 07 June 2009 - 11:17 AM

I went the

Pascal - C - C++ + Java/C# route

I would start with C/C++

because as mentioned above Java covers up some behind the seens stuff...
Was This Post Helpful? 0
  • +
  • -

#22 Pwn   User is offline

  • D.I.C Regular

Reputation: 19
  • View blog
  • Posts: 458
  • Joined: 25-November 07

Re: comp science 1st yr. -- C++ or java ?

Posted 08 June 2009 - 06:30 PM

I've only skimmed the first few replies, so pardon me if I paraphrase what someone else already said. That said, I would WHOLLY recommend you learn both, and here's why.

If you only learn Java, then you don't get the benefit of knowing exactly what constitutes OOP programming. If you do get the chance to look at C or C++ code, you would likely be spending a lot of time learning something you didn't already know, such as how to work with pointers, since Java is devoid of pointers.

If you only learn C++, and later try to pick up on Java, you stand a good chance of taking the short route to learning Java and not learning proper use of Java. Let me explain this further in real world terms. In my job, I have the outstanding pleasure of using several Java based "professional" applications, and the more I use them, the more I hate Java. Today, for instance, I had 3, just 3, of these applications running, and the more I used them, the more I left them running, the slower my pc got. I'm not sure the reason for this, but if I opened the Java console and ran the GC, my pc would immediately get faster. At one point, I would launch one of the Java applications (after shutting it down for being slow) and it took it no less than 15 minutes just to display the first form. As soon as I ran the GC, the form showed. The memory usage showed it at like 4 MB free out of 17 MB, roughly 15%?. For some reason, this lack of free memory (Stack I presume) also affected the other Java programs I was using. From this information, it appears that Java allocates a minimum of memory to the whole of the Java runtime, then when you open additional Java progams, it must divide that Stack among the running Java applications, reducing their available Stack (just an assumption). To further complicate this issue, Java doesn't seem to know it needs to allocate more resources, either that or it's unable to allocate more. Therefor, even though Java is cross-platform, it is not system-aware and that is it's major flaw.

I may not be dead-on with this, but I bet I'm not far from the truth. So, my recommendation is if Java is to remain in use commercially, than it needs more people who know Java, and not just tutorial educated people who are not sure. Be a Java guru, by all means!
Was This Post Helpful? 1
  • +
  • -

#23 bsheairs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 03-June 09

Re: comp science 1st yr. -- C++ or java ?

Posted 12 June 2009 - 11:44 AM

I would personally start with learning Java, and after you are comfortable with Java you can start looking at C++.

If you learn Java first it will correctly teach you OOP rather than with C++. In OOP you aren't suppose to be able to have the ability for a single class to inherit from 2 unrelated classes, as C++ supports. Also with Java, it's easier to learn, because it is a lot more straight forward, while C++ has a few topics that tend to be very confusing at first.

And on another note, as it was said before, C++ isn't going anywhere. There is a significant amount of money in Java research. While sure C++ is a faster running language at the moment, in a few years Java will greatly improve in the next few years where as C++ won't as much.

Knowing Java well could really help you out later on.
Was This Post Helpful? 0
  • +
  • -

#24 Dantheman   User is offline

  • D.I.C Regular

Reputation: 34
  • View blog
  • Posts: 445
  • Joined: 27-May 09

Re: comp science 1st yr. -- C++ or java ?

Posted 12 June 2009 - 12:25 PM

View Postbsheairs, on 12 Jun, 2009 - 10:44 AM, said:

In OOP you aren't suppose to be able to have the ability for a single class to inherit from 2 unrelated classes, as C++ supports.

What a joke. Please, don't post such garbage, some people might actually believe it.

This post has been edited by Dantheman: 12 June 2009 - 07:04 PM

Was This Post Helpful? 0
  • +
  • -

#25 paser   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 135
  • Joined: 30-May 09

Re: comp science 1st yr. -- C++ or java ?

Posted 12 June 2009 - 05:45 PM

I like how the debate in here gets heated, good to see people with passion about what they do/know. Ill throw in my two cents. This coming year i start @ the uni of south carolina as a computer engineering major. CE and CS both take the same classes first year. I have looked @ the class descriptions and we do Java first year. we do C++ and assembly second year. I have started teaching myself C++ and have gotten prty far. I personally think intro to either language isnt hard, and i dont think learning either is a waste.

if you knew java first and did c++, ull be like on thats how this happens etc.., if u did c++ first then java ull be like o i dont have to do this anymore, id say learning both is good.

I have a friend whose been there for 2 years, and he says that Java is easier to learn, and in an algorithm design class id spend more time learning to problem solve than learning a language. He himself uses C++ to write high performance programs to do all the calculations for some kind of research , but he had to learn java first.

If the focus of the class is to teach problem solving, id say java. If its to teach a language, id go C++. I doubt either approach is wrong for u.

Hope ive been helpful , if i have said anything misleading/wrong forgive me, ive only recently gotten into serious programming (used to do php and sql to make online games =D )
Was This Post Helpful? 0
  • +
  • -

#26 abudy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 22-June 09

Re: comp science 1st yr. -- C++ or java ?

Posted 22 June 2009 - 02:18 AM

I say having good knowledge and experience of C language is enough to start learning any of the two in whatever sequence, and remember that c++ is just a c upgrade including new libraries so it would be easier going the c++ road first.

As for the learning approach, home based self-learning would be the best
as you would learn at a pace that suits you best and not the average student.
Was This Post Helpful? 0
  • +
  • -

#27 kmangold   User is offline

  • D.I.C Head
  • member icon

Reputation: 11
  • View blog
  • Posts: 167
  • Joined: 24-June 09

Re: comp science 1st yr. -- C++ or java ?

Posted 24 June 2009 - 05:15 AM

I am very biased on Java. I have learned to love object-oriented programming (once I understood it well enough to use, many many years ago). It was hard for me to change the way I thought from procedural to object-oriented. C++ has classes as well, though it is not forced. To be a well-rounded computer scientist/programmer, you will need to learn both. Those two would just be a start. There are many other languages out there that have their importance in industry. I have never been on a project where I am ONLY using Java, or ONLY using C++. Since you can use C++ to create object-oriented applications, I would suggest starting with that.
Was This Post Helpful? 0
  • +
  • -

#28 Langretz   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-June 09

Re: comp science 1st yr. -- C++ or java ?

Posted 26 June 2009 - 05:51 AM

View Postrharriso, on 30 Apr, 2009 - 10:53 AM, said:

C++ is not the answer for novice programmers. Too many cryptic errors. I remember getting really frustrated before I knew what the hell a segfault was. Its not a good way to break in noobs. However, Java is super crunchy and slow, not a fan.


I think C++ is great for beginners, I just don't think coding in a Linus/Unix environment is the best way to teach kids is all. I learned C++ in highschool. And they way we got around all those weird cryptic errors at first was by coding in Microsoft Visual Studio. Java requires you to learn a bunch of libraries in order to do a lot of coding, C++, in my experience, lets you do more "out of the box".
Was This Post Helpful? 0
  • +
  • -

#29 thursdayniac   User is offline

  • D.I.C Regular

Reputation: 6
  • View blog
  • Posts: 255
  • Joined: 26-April 09

Re: comp science 1st yr. -- C++ or java ?

Posted 10 July 2009 - 08:54 AM

View Post333OnlyHalfEvil, on 27 Apr, 2009 - 12:41 AM, said:

I would have to say Java or C#. You should learn a language which uses OOP. While C and C++ are good languages they're still, in a sense, becoming more and more outdated as time goes on.



Um... C and C++ will not be outdated for a very long time. People that write lower level stuff (firm ware/drivers) use C A LOT.
And C++ is one of the best languages there is.


I would say learn C++. It's not quite as high lvl as c# and java so you will learn good programming practices. It's also OO so you will learn classes and objects.

This post has been edited by thursdayniac: 10 July 2009 - 08:54 AM

Was This Post Helpful? 0
  • +
  • -

#30 bgonzales999   User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 108
  • Joined: 07-February 09

Re: comp science 1st yr. -- C++ or java ?

Posted 22 August 2009 - 04:02 PM

I started with C++ and I'm happy I did although it is a little difficult there is no end to online forums, reference materials, or tutorials. So help is just a mouse click away.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3