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

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

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

#1 Shitij1990  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 31-October 08

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

Posted 23 April 2009 - 07:34 AM

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??

Is This A Good Question/Topic? 0
  • +

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

#2 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1933
  • View blog
  • Posts: 4,015
  • Joined: 11-December 07

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

Posted 23 April 2009 - 08:04 AM

I have no opinion on which you should learn but this:

Quote

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.


... is utter garbage. If anything, Java is marginally better for teaching classes and object orientation because in Java everything is in a class.

Either language will stand you in good stead.
Was This Post Helpful? 0
  • +
  • -

#3 anish_shukla  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: -1
  • View blog
  • Posts: 65
  • Joined: 04-March 09

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

Posted 25 April 2009 - 01:16 PM

Well ! Java is rather OOP based language than c++.So it would be easier to understand classes using Java.

But, Where i feel c++ is ahead than java is programming OS based executables( they really are very rigorous if handled properly),While java is mainly used to make web based applications.So , I'll suggest u to learn c++ (it will hardly take 15 days if u already thorough with C )and after that u can learn Java core (within 45 days ,net 2 months)
then u'll be having three languages under ur hood and an option opened for future when u come to chose from web or OS based applications development.

For books vs institution.U r doing B.TECH ! So u are intelligent enough to learn the basic syntax of any language yourself.Just look for "The complete reference " around the stores and start doing it yourself .And remember one thing
"The best teacher u can get is just u".

Algorithm designing and Performance Analysis is rather important than knowing bulk of languages for a software engineer.So keep an eye on your Btech course while learning other stuffs.
Was This Post Helpful? 0
  • +
  • -

#4 333OnlyHalfEvil  Icon User is offline

  • D.I.C Addict

Reputation: 24
  • View blog
  • Posts: 664
  • Joined: 20-March 09

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

Posted 27 April 2009 - 01:41 AM

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.
Was This Post Helpful? 0
  • +
  • -

#5 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

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

Posted 27 April 2009 - 06:33 AM

C++ isn't going anywhere. (A new standard is supposed to be coming out this year) If you know C then all you have to do is learn syntax and OOP to learn C++.
Was This Post Helpful? 0
  • +
  • -

#6 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 205
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

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

Posted 27 April 2009 - 06:39 AM

They are both OO languages and personally I would encourage you to understand the basics of both.

From experience I would say take a class in the language that appears harder to you. Having good instruction can make the difference in learning a language that has previously evaded you. You can always use DIC and self teaching to learn the other :)
Was This Post Helpful? 0
  • +
  • -

#7 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

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

Posted 27 April 2009 - 11:32 AM

View PostWilliam_Wilson, on 27 Apr, 2009 - 05:39 AM, said:

They are both OO languages and personally I would encourage you to understand the basics of both.

From experience I would say take a class in the language that appears harder to you. Having good instruction can make the difference in learning a language that has previously evaded you. You can always use DIC and self teaching to learn the other :)


I completely agree. My instructor, while im just in Introduction to C++, said that once you learn C++ you can basically learn a lot of other languages because c++ is a basis for most other languages, along with the fact that C's compile was built in C and it's the only language that has done so, (or that's my understanding), I know I took java last year and when I went into C++ I found java didn't help me at all, infact it confused me more than if I had just started off with C++. I believe if I were to retake that Java class it would be far simpler to understand and comprehend the concepts because of my understanding of C++ now.
Was This Post Helpful? 0
  • +
  • -

#8 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 944
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

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

Posted 29 April 2009 - 04:59 PM

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??


Both are good choices. Java is platform independent and also C++ has standard libraries on most systems. If you are comfortable with C I don't think either would be hard to pick up.

The question I have for you is: What do you want to program?

Once you've decided that you try and find out which one suits what you want to program.
Was This Post Helpful? 0
  • +
  • -

#9 rharriso  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 45
  • Joined: 29-April 09

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

Posted 30 April 2009 - 11:53 AM

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.
Was This Post Helpful? 0
  • +
  • -

#10 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 252
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

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

Posted 01 May 2009 - 03:00 PM

Anyone who knows what's been going on with the JVM and HotSpot technology in the past 5+ years knows the "Java is slow" myth was dispelled years ago. This one is just as rubbish as the comment about C++ being better for learning OO. Nonsense and misinformation. Don't believe it. It hasn't been true since the turn of the century. Google will give you plenty to chew on with regard to this, but here's a wikipedia entry to get you started.
Was This Post Helpful? 1
  • +
  • -

#11 Jubb  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 06-May 09

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

Posted 07 May 2009 - 07:31 AM

I would say learn Java first because if you learn C++ first, then when you move to Java you will feel imprisoned. You are not allowed to do nearly as much with Java as with C++. Java tries to protect you from your own mistakes, C++ lets you make those mistakes and possibly take down your own computer.

When I left Java and turned to C++ I felt as if the chains had been taken off.
Was This Post Helpful? 0
  • +
  • -

#12 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

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

Posted 07 May 2009 - 01:51 PM

Lol, just recently done a disertation on why the java is slower than c++ myth is so outdated and is no longer true. My test actually showed it faster in many areas, apart from trigonmetric functions which it really needs to improve on!!!
So your doing a BTEC....Not sure where your from, but in the UK a BTEC normally leads onto a degree. I have just finished my second year on a computer science degree. Let me give you an idea....The first year means nothing to the degree but all we learnt was java, but dont take this as a guide.
Second year just completed, we studied Object Orientated Programming using java, C++ using the OpenGL Library and C# using the XNA Framework. Its a lot of languages but i think it is best to learn as many as you can. What you will then notice is some languages are very simular to others, like i couldnt believe how similar c# was to java. Many universities in my experience tend to choose java as their primary language, and because i love this language i would advise you too start with this. Once you start getting a bit comfortable with this, start looking at a bit of C++.
Was This Post Helpful? 0
  • +
  • -

#13 induster  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 20
  • Joined: 01-March 09

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

Posted 09 May 2009 - 03:33 PM

I'd say C++ with the assumption of moving into C# from there. If you learn C++ you'll understand at a much deeper level how your code works. You'll understand how important garbage collection is and so on...
Was This Post Helpful? 0
  • +
  • -

#14 polypterus  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 17
  • Joined: 03-April 09

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

Posted 10 May 2009 - 07:33 PM

It depends on your goals. If you want to initially focus more on applications, games etc. Then C++ for sure. If you want to focus on the web Java might be a better choice. If you already know C, C++ is probably a natural progression. In my opinion the BEST way to learn a language is to use it. Have something in mind you want to write and just GO! You may make a lot of mistakes but you can always fix them and you will have something to show for it in the end. Also I think the right book(s) will help you a lot.
Was This Post Helpful? 0
  • +
  • -

#15 Dantheman  Icon 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 27 May 2009 - 11:39 PM

The choice of language shouldn't be a factor. You can learn the syntax in a week. 2 months is more than enough to learn both languages, if you know what I mean.
Was This Post Helpful? 0
  • +
  • -

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