Results 1 to 10 of 10
  1. #1
    silverglade is offline Senior Member
    Join Date
    Feb 2009
    Posts
    182
    Rep Power
    6

    Default Should I learn C++ first before Java?

    Should I learn C++ first before java please? I am new to programming, but know the basic principles of object oriented programming. any help greatly appreciated. thank you. Derek

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    It really isn't very important which you learn first. Why not try learning both at the same time? Get an intro c++ and intro java book and read them simultaneously, this has a few benefits. You can see the differences between c++ and java as you go. You can see the similarities in the two languages. Finally, you can decide which language you enjoy more.

    Learning to program generally comes down to concepts and less about which language you choose. I understand java much more than I understand c++ but personally I enjoy c++ more.

    Some good books for both that I would recommend are
    java:
    Head first java
    Java software solutions
    Thinking in Java

    c++:
    c++ without fear
    accelerated c++
    practical c++ programming
    (I have heard good things about c++ primer and I have ordered it from amazon, it could be worth it for you to look into as well)

    Finally, a book I suggest for many people which isn't c++ or java based is How to Design Programs, freely available at HTDP.org. It uses a language called Dr.Scheme which is a variant of lisp.

  3. #3
    silverglade is offline Senior Member
    Join Date
    Feb 2009
    Posts
    182
    Rep Power
    6

    Default

    GREAT thank you so much Sunde887, thanks for taking the time to write that. That helps me A LOT. I will do what you said. thank you very much!! Derek

  4. #4
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You are welcome. Also, when learning java, this is a good site to frequent. Help where you can, if you are stuck, ask a question here. Try to find a good beginner c++ forum to read and try to help there as well. Think of good projects to learn with once you get a better grasp of the language.

    Another good c++ book(which I haven't read, assuming it's good because of the author) is Programming:Principles and Practice Using c++, it's written by Bjarne Stroustrup(the creator of c++). The book is designed by him for an entry level c++ class.

  5. #5
    silverglade is offline Senior Member
    Join Date
    Feb 2009
    Posts
    182
    Rep Power
    6

    Default

    Awesome thanks again. I am totally new to this forum, but so far the people have been very nice. COOL!!. thank you. Derek

  6. #6
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Also, I suggest using a simple editor(notepad++, notepad, etc) and command line for writing, compiling and running java code while starting out. It forces you to remember little things, get used to compiler errors, and paying attention to matching brackets.

    Some people may disagree with me, but I like this approach. It's also helpful to start out by hand coding gui code, and moving onto a gui builder when you understand gui building and want to speed up the process.

    For c++, I use Code::Blocks, I like the idea of using a text editor and command line compiling with c++ as well, but I ran into some problems and Im not sure how all the compiler setup works exactly. Once I started using headers it became easier to use the Code::Blocks IDE.

    Accelerated c++ also moves a bit quick and expects you to have a basic understanding of programming concepts. It is shaping up to be one of my top favorite books though.

  7. #7
    silverglade is offline Senior Member
    Join Date
    Feb 2009
    Posts
    182
    Rep Power
    6

    Default

    Wow sunde887, this is GREAT. You basically told me everything I need to get started, and got me on my way to my future! THANK YOU so much! This is awesome. Yes I have notepad++ I used to program php, but I HATE php. I did a text game in C++ a few years ago and I loved it. I am not sure if I will love java, but for making games, I loved C++. But most of the jobs , almost all of them, in central new jersey usa, were for java. So I may focus more on java to earn an income due to the popularity of it on craigslist, which may be indicative of the industry demand as a whole, I could be wrong though. Thank you!! Derek

  8. #8
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You will notice quite a lot of similarities between C++ syntax and java syntax. The biggest difference I notice between the two is that java babies you a little bit more. Instead of allowing you to do something wrong it throws a runtime exception. For example, if you try placing an element in a non existent array index, you will get an arrayindexoutofbounds exception. In c++ it will store the element in the next memory address which will wipe out what was there before, causing hard to find bugs.

    In Java Everything is stored in a class and your main method is static to allow the jvm to enter the program, in c++ you don't need everything to be in a class which is another difference.

    I don't know if you will need this, however; if you do, I used it to set up the classpath and allow me to compile correctly.
    TheNewBoston – Free Educational Video Tutorials on Computer Programming and More! Java Programming Tutorial – 1 – Installing the JDK

  9. #9
    silverglade is offline Senior Member
    Join Date
    Feb 2009
    Posts
    182
    Rep Power
    6

    Default

    Great thank you. That saves me a lot from a possible big headache when I start. thanks.

  10. #10
    Join Date
    May 2011
    Location
    Maryland
    Posts
    38
    Rep Power
    0

    Default

    although working with notepad is a good way to start, once you become familiar with java i'd suggest downloading eclipse for writing your code. it does do a certain amount of "babying" but it's extremely helpful for learning because when you do something incorrectly it gives you a message that tells you what you did wrong. this makes identifying problems much easier. good luck!

Similar Threads

  1. What's the best way to learn Java
    By gkoef in forum New To Java
    Replies: 1
    Last Post: 11-11-2010, 07:37 PM
  2. How did you learn Java?
    By Learning Java in forum New To Java
    Replies: 13
    Last Post: 05-16-2010, 05:45 PM
  3. Best way to learn Java?
    By AwsmGy in forum New To Java
    Replies: 3
    Last Post: 08-22-2009, 11:57 PM
  4. How do you learn java??
    By low224 in forum New To Java
    Replies: 1
    Last Post: 12-07-2008, 08:42 PM
  5. How to learn java??
    By superroach in forum New To Java
    Replies: 2
    Last Post: 10-21-2008, 07:51 PM

Posting Permissions

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