Notices
Results 1 to 8 of 8

Thread: comp science 1st yr -- C++ or Java ??

  1. #1 comp science 1st yr -- C++ or Java ?? 
    New Member
    Join Date
    Apr 2009
    Posts
    1
    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??

    I want to learn java, but im hesitant because i dont know if i'll be able to learn it properly if i already dont know C++.....
    Any advice would be appreciated, thanks in advance....


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Masters Degree Numsgil's Avatar
    Join Date
    Jan 2009
    Posts
    708
    In many schools of thought learning Java first is preferred because then you don't learn bad habits.

    Think of C++ like a swiss army knife. It's extremely versatile, but you can also do stupid things with it like try opening a can of peas with the knife blade.

    Java is like a can opener. It has a very specific use (Object Oriented programming), and is ergonomically designed around that use. But it's a terrible device to use for, say, buttering bread.

    So I would recommend starting with Java if you don't understand Object Oriented programming. Because Java is a better teacher than C++. And for things like application development it's preferred over C++, so it's hardly like it's a training wheels language, either.


    Reply With Quote  
     

  4. #3  
    Administrator KALSTER's Avatar
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    8,245
    Quote Originally Posted by Numsgil
    In many schools of thought learning Java first is preferred because then you don't learn bad habits.

    Think of C++ like a swiss army knife. It's extremely versatile, but you can also do stupid things with it like try opening a can of peas with the knife blade.

    Java is like a can opener. It has a very specific use (Object Oriented programming), and is ergonomically designed around that use. But it's a terrible device to use for, say, buttering bread.

    So I would recommend starting with Java if you don't understand Object Oriented programming. Because Java is a better teacher than C++. And for things like application development it's preferred over C++, so it's hardly like it's a training wheels language, either.
    Isn't it also farely easy to transfer onto C++ from Java? I mean, aren't they closely related?
    Disclaimer: I do not declare myself to be an expert on ANY subject. If I state something as fact that is obviously wrong, please don't hesitate to correct me. I welcome such corrections in an attempt to be as truthful and accurate as possible.

    "Gullibility kills" - Carl Sagan
    "All people know the same truth. Our lives consist of how we chose to distort it." - Harry Block
    "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
    Reply With Quote  
     

  5. #4  
    Forum Masters Degree Numsgil's Avatar
    Join Date
    Jan 2009
    Posts
    708
    Yes, it's mostly learning a slightly different syntax. C++ to Java is a bit harder, again because of the Swiss Army knife to can opener analogy.
    Reply With Quote  
     

  6. #5  
    New Member
    Join Date
    May 2009
    Posts
    3
    Well, starting off with Java will be a good idea because C and C++ provide a wider instruction set and are very versatile but are less safe and less strict. I mean, when you're starting as a beginner, you should surely learn Java first. Then, as professional programmers, people learn C or C++. Because for all the basic and simple and common things, Java is very good. Whereas, when you go on to write a compiler or study Operating Systems, there you should prefer C or C++.

    In a nutshell, starting off with Java is a good idea.
    Reply With Quote  
     

  7. #6  
    Forum Ph.D. Steve Miller's Avatar
    Join Date
    Dec 2006
    Location
    Magdeburg, Saxony-Anhalt, Germany
    Posts
    782
    I would recommend to get around Java by all means. Learn C++ and take good care Java won't suck you in one day.

    Steve
    Reply With Quote  
     

  8. #7 comp science 1st yr -- C++ or Java ?? 
    New Member
    Join Date
    Aug 2009
    Posts
    2
    Hello
    Go for java/J2ee
    Refer to the books of java from
    http://www.pdftutorials.com/tutorial...ks-shelf1.html
    Thnks
    RC
    Reply With Quote  
     

  9. #8  
    Forum Freshman scubagirl's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    12
    I'd suggest learning C++ first, from personal experience. Since C++ isn't typesafe and doesn't have built-in memory management, learning how to deal with those things before you learn Java will really help later, and prevent you from getting into some bad habits/assumptions. Also, I think it's good to understand object-oriented programming before learning Java.
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •