School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 306,975 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,883 people online right now. Registration is fast and FREE... Join Now!




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

2 Pages V  1 2 >  

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

Shitij1990

23 Apr, 2009 - 06:34 AM
Post #1

New D.I.C Head
*

Joined: 31 Oct, 2008
Posts: 5



Thanked: 1 times
My Contributions
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??

User is offlineProfile CardPM
+Quote Post


cfoley

RE: Comp Science 1st Yr. -- C++ Or Java ?

23 Apr, 2009 - 07:04 AM
Post #2

D.I.C Addict
Group Icon

Joined: 11 Dec, 2007
Posts: 660



Thanked: 63 times
Dream Kudos: 25
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

anish_shukla

RE: Comp Science 1st Yr. -- C++ Or Java ?

25 Apr, 2009 - 12:16 PM
Post #3

New D.I.C Head
*

Joined: 4 Mar, 2009
Posts: 23



Thanked: 1 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

333OnlyHalfEvil

RE: Comp Science 1st Yr. -- C++ Or Java ?

27 Apr, 2009 - 12:41 AM
Post #4

D.I.C Addict
****

Joined: 19 Mar, 2009
Posts: 540



Thanked: 18 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

eker676

RE: Comp Science 1st Yr. -- C++ Or Java ?

27 Apr, 2009 - 05:33 AM
Post #5

C++ Programmer
Group Icon

Joined: 18 Apr, 2009
Posts: 652



Thanked: 68 times
Dream Kudos: 25
My Contributions
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++.
User is offlineProfile CardPM
+Quote Post

William_Wilson

RE: Comp Science 1st Yr. -- C++ Or Java ?

27 Apr, 2009 - 05:39 AM
Post #6

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,667



Thanked: 97 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
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 smile.gif
User is offlineProfile CardPM
+Quote Post

IngeniousHax

RE: Comp Science 1st Yr. -- C++ Or Java ?

27 Apr, 2009 - 10:32 AM
Post #7

D.I.C Addict
****

Joined: 28 Mar, 2009
Posts: 630



Thanked: 15 times
My Contributions
QUOTE(William_Wilson @ 27 Apr, 2009 - 05: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 smile.gif


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.
User is offlineProfile CardPM
+Quote Post

SixOfEleven

RE: Comp Science 1st Yr. -- C++ Or Java ?

29 Apr, 2009 - 03:59 PM
Post #8

Code Guru
Group Icon

Joined: 18 Oct, 2008
Posts: 3,050



Thanked: 169 times
Dream Kudos: 775
Expert In: C, C#, XNA, Game Programming, Programming Concepts

My Contributions
QUOTE(Shitij1990 @ 23 Apr, 2009 - 06: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??


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.
User is offlineProfile CardPM
+Quote Post

rharriso

RE: Comp Science 1st Yr. -- C++ Or Java ?

30 Apr, 2009 - 10:53 AM
Post #9

New D.I.C Head
*

Joined: 29 Apr, 2009
Posts: 45



Thanked: 3 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Programmist

RE: Comp Science 1st Yr. -- C++ Or Java ?

1 May, 2009 - 02:00 PM
Post #10

Slouching towards Bethlehem
Group Icon

Joined: 2 Jan, 2006
Posts: 1,407



Thanked: 28 times
Dream Kudos: 100
Expert In: Java

My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Jubb

RE: Comp Science 1st Yr. -- C++ Or Java ?

7 May, 2009 - 06:31 AM
Post #11

D.I.C Head
**

Joined: 6 May, 2009
Posts: 80



Thanked: 5 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

nick2price

RE: Comp Science 1st Yr. -- C++ Or Java ?

7 May, 2009 - 12:51 PM
Post #12

D.I.C Lover
*****

Joined: 23 Nov, 2007
Posts: 1,345



Thanked: 121 times
My Contributions
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++.
User is offlineProfile CardPM
+Quote Post

induster

RE: Comp Science 1st Yr. -- C++ Or Java ?

9 May, 2009 - 02:33 PM
Post #13

New D.I.C Head
*

Joined: 1 Mar, 2009
Posts: 18



Thanked: 2 times
My Contributions
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...
User is offlineProfile CardPM
+Quote Post

polypterus

RE: Comp Science 1st Yr. -- C++ Or Java ?

10 May, 2009 - 06:33 PM
Post #14

New D.I.C Head
*

Joined: 3 Apr, 2009
Posts: 17



Thanked: 1 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Dantheman

RE: Comp Science 1st Yr. -- C++ Or Java ?

27 May, 2009 - 10:39 PM
Post #15

D.I.C Regular
***

Joined: 27 May, 2009
Posts: 445



Thanked: 25 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

computerfox

RE: Comp Science 1st Yr. -- C++ Or Java ?

28 May, 2009 - 12:22 PM
Post #16

straight vegetarian kid
*****

Joined: 29 Jan, 2009
Posts: 3,772



Thanked: 48 times
Dream Kudos: 1700
My Contributions
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.

smile.gif hope that helps and all the best!

This post has been edited by computerfox: 28 May, 2009 - 12:23 PM
User is offlineProfile CardPM
+Quote Post

drjoe51

RE: Comp Science 1st Yr. -- C++ Or Java ?

1 Jun, 2009 - 08:15 AM
Post #17

D.I.C Head
**

Joined: 16 Mar, 2008
Posts: 135



Thanked: 1 times
My Contributions
QUOTE(Shitij1990 @ 23 Apr, 2009 - 06: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??


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.
User is offlineProfile CardPM
+Quote Post

Kanvus

RE: Comp Science 1st Yr. -- C++ Or Java ?

5 Jun, 2009 - 01:14 AM
Post #18

D.I.C Regular
Group Icon

Joined: 19 Feb, 2009
Posts: 451



Thanked: 39 times
Dream Kudos: 50
My Contributions
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: 5 Jun, 2009 - 01:15 AM
User is offlineProfile CardPM
+Quote Post

sbromley

RE: Comp Science 1st Yr. -- C++ Or Java ?

5 Jun, 2009 - 10:22 AM
Post #19

New D.I.C Head
*

Joined: 20 May, 2009
Posts: 42



Thanked: 7 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

janotte

RE: Comp Science 1st Yr. -- C++ Or Java ?

7 Jun, 2009 - 02:59 AM
Post #20

code > sword
Group Icon

Joined: 28 Sep, 2006
Posts: 2,171



Thanked: 153 times
Expert In: C/C++

My Contributions

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.
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:12AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month