C or Java as a first language

This is a discussion on C or Java as a first language within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I am considering using C or Java as a first language. Which would be easier to learn first? You may ...

  1. #1
    CorJava
    Guest

    C or Java as a first language

    I am considering using C or Java as a first language. Which would be easier to learn first? You may think its ridiculous for someone to come to a C forum and ask for a comparison with another language. But, I am not asking which is superior, but rather which is better for a beginner. I've heard many say Java is easier to learn than C++. But I'm just talking about C. I haven't seen any C/Java comparisons really. Just C++ and Java. I guess thats because C++ is OO like Java. I figured if I am going to learn OOP, I might as well use Java since it is more simple than C++. However as I am a beginner, OOP might not be a good idea for me yet. So, in that case, maybe I should go with C. To the contrary, I've heard C has these things called pointers(is that like a goto type thing?), that are often very difficult for beginners to comprehend; while Java lacks that.So my decision has been narrowed down to C or Java, which should I start with? As you can see, I need some guidance in this decision. I appreciate any help you can give me.

    PS:
    Although I am pretty much set on using one of these two languages, I am open to some other suggestions if I happen to be terribly mistaken in my selections.

  2. #2
    daticus
    Guest
    Go with C, there are some concept in Java that might overwhelm u if this is your first language; stuff like inheirtance, polymorphisim.

    Right now i'm re-learning C and it's perfect for any beginner.

  3. #3
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    You need to acquire a compiler to use C/C++. The book to get is C++ Primer 3rd edition. It's a 1,200 page book and it will give you a full introduction to C++ like no other book on this planet. It's the most comprehensive book on C++, and it is aimed at beginner/intermediate.

    The C programming language is the easiest to learn, but you might be able to learn it through C++.

    If you go with Java, that would be good too. C/C++ and Java should not be compared with each other. If you want to learn Java, than ask questions at < www.flashdaddee.com >. There isn't many posts there, but the programmers will answer any Java question, especially the webmaster.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Which would be easier to learn first?
    It depends on what you want to do with it. C and Java are used for wildly different purposes. The generic answer is that Java is the simpler language to learn and use for non-trivial projects quickly. C requires low level knowledge and a certain amount of 'tricks' to be able to write a useful level of code. If you just want to get started programming something useful as quickly as possible then I would recommend Java, otherwise I would recommend you determine exactly what you want to do with the language and then choose which language fits that need the best.

    -Prelude
    My best code is written with the delete key.

  5. #5
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Agree with prelude on this. I have taught Java and C for over 2 years my students with C background tend to do better. You will also see that the non OOP stuff in Java is almost exactly like C.


    To Troll_King

    C++ Primer Plus and C Primer Plus are now on there 4th edition. Good Books.
    Mr. C: Author and Instructor

  6. #6
    CorJava
    Guest
    Thank you all for the advice. I'm not exactly sure what I want to do with the language. I would say its more of just me wanting to acquire some solid programming skills. General-purpose, all around programming, would be my goal, I guess.
    I'm still confused, because everyone has made some valid points.
    Take what daticus said for example:

    Go with C, there are some concept in Java that might overwhelm u if this is your first language; stuff like inheirtance, polymorphisim.
    (hope the quote tags worked)


    That kind of confirms what I've worried about so far as OOP is concerned. Troll King also said C would be the easier language.

    But then Prelude and Mister C, made some good arguments too. I've heard that C is definitely more low-level than Java, and I've also heard the concept of pointers can throw some beginners off as well. So I'm getting good arguments from both sides. Hence the confusion.

    I have a book and a compiler for each language, and I've done some basic "hello world" type things in each language, so I'm pretty much ready to get started. I'm just waiting to see which I'm going to dedicate my time to.

    (However, I would like to have a smarter text editor other than notepad for Java. You know what I mean? Basically, something similar to the one in my Borldand IDE I have for C, except for Java. Know where I can get a freeware one? It would just make it easier for me.)

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,337
    More editors than you can shake a stick at.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    Registered User Sargnagel's Avatar
    Join Date
    Aug 2002
    Posts
    166
    @EDITORs:
    As a freeware IDE for JAVA I'd prefer the Lite-Version of JCreator (Windows).
    http://www.jcreator.com/

    But if you want to spend some money, I suggest buying UltraEdit32 if you're programming in the windows environment. I love this editor!
    http://www.ultraedit.com
    Last edited by Sargnagel; 10-20-2002 at 03:31 PM.

  9. #9
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I don't know what to say. I'm going to tell you my experience. I learned JAVA in high school. I learned C the following summer with little trouble. I know not everyone is the same so I can't say which would be most benificial in learning the other. JAVA's syntax is based on C++ which is the same syntax as C. Generally speaking once you have a general grasp on key programming techniques you can learn any language using your experience with another. For example, before knowing JAVA I knew HTML and PERL. Pointers were the only big new thing to deal with when I was learning C. Because of my JAVA background I was able to pick up on C++ in an afternoon. Last week I took about an hour of my time to learn pascal.

    The point is you could choose a language at random here. Once you have an understanding of what you are doing the other should be no big deal to learn.

  10. #10
    Registered User
    Join Date
    Oct 2002
    Posts
    7
    there is one company with a programmer training course that starts with 4 weeks of C and then 4 weeks of Java to train Java programmers.

    if your goal is to gain good, solid programming skills, i'd recommend C first and then Java since Java can be considered a grandchild of C.

  11. #11
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Originally posted by Mister C

    To Troll_King

    C++ Primer Plus and C Primer Plus are now on there 4th edition. Good Books.
    The only problem dude, is that those are not the books I am talking about.

    < http://www.amazon.com/exec/obidos/tg...lance&n=507846 >

    This is the book, and it is the best book on C++.

  12. #12
    CorJava
    Guest
    Thanks Salem and Sargnagel for the links. I downloaded the IDE Sargnagel posted the link to, and it looks like it will work out for me just fine, should I decide to go with Java.

    The point is you could choose a language at random here. Once you have an understanding of what you are doing the other should be no big deal to learn.
    You just might be right, master5001. I don't know if I can do that though. But I think I'm goint to try to hurry with a decision. I guess for your point, it doesn't matter how I arrived at it, random or not, but rather that I arrived at a decision at all. I'm going to choose right now, and I think I'll go with Java. The reason is, I really want to learn OOP. As a novice, I don't know if attempting OOP is a good idea, but I might as well give it a try. Besides, someone else here said that I could do more with Java quicker than I can with C. Or something to that effect. I'll just post the quote, and perhaps Prelude will elaborate or clarify if he wants:

    If you just want to get started programming something useful as quickly as possible then I would recommend Java, otherwise I would recommend you determine exactly what you want to do with the language and then choose which language fits that need the best.

    On another note, the book I have is Sam's Teach Yourself Java in 21 Days. Is anyone familiar with this?

    Also, I must admit, I was tempted to choose C for the fact that I found a knowledgeable and active community for the language. I just have not seen anything like this for Java. If anyone knows of any active, helpful, and beginner-friendly, Java forums out there, please let me know. Troll King mentioned one already, but he said they are not very active. Did I understand right?

    Thanks to everyone for all the help.

    (By the way, I forgot to ask: Which is the harder concept for beginners to grasp?:
    The OOP of Java, or the pointers of C?)

  13. #13
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    You really should get the C++ book mentioned above if you have the opportunity, because you can't get away with just Java.

    As for Java, I'm going with the Sun Microsystems series:

    Core Java Volume I -Fundamentals 6th edition (2003)
    Core Java Volume II -Advanced Features
    Just Java 2 Fifth Edition

    Here is a Java Forum < http://forum.java.sun.com/ >
    And:
    < www.javaranch.com >

  14. #14
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    If you want to know what the difference between C++ and Java is than it would take about five pages of reading. There is a very big difference, but asking that, basically requires an essay.

  15. #15
    CorJava
    Guest
    Thanks Troll King. I definitely plan to learn C++ eventually. From what I understand it is the most widespread language out there. I understand how important it is, and I do not want lack proficiency in it for long. As a matter of fact, if I could pick one language to be an expert in, I would pick C++. But I'm trying to be realistic here. Many experienced programmers, who definitely know more and are more intelligent than myself, didn't take on C++ as a first langauge.
    Besides, I wasn't trying to decide between C++ and Java for now, but C and Java. When I do decide to take on C++ however, I will definitely look into the book you recommended. But by the time I am ready, the edition you liked will probably be nearly impossible for me to obtain.
    I'm not going to buy any more Java books for now. I have this one book I spent enough money on. So, I will try to make the most out of this one first. But the books you recommended probably have some things that my book doesn't cover(especially the second volume) and they are written by the creators of Java so that is a plus. I might end up looking into those as well. But that will probably come later. My book is more of an introductory text, whereas yours are probably more of a thorough reference.
    I'm not the brightest bulb in the box, so I expect this(my learning of basic Java) to take a while. Thanks for the forum links though. I'm sure those are some things I can make use of very soon.

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Java vs C to make an OS
    By WOP in forum Tech Board
    Replies: 59
    Last Post: 05-27-2007, 03:56 AM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  3. Is C++ going to be around?
    By BMW-Guy in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 11-24-2004, 04:20 PM
  4. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  5. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21