Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
News

Good Java Books for Beginners? 13

nobody69 asks: "During the spring I took a C++ class at the local junior college and, frankly, the textbook sucked. However, I remembered hearing Good Things about 'Practical C++ Programming' on /., so I picked it up and found it to be a great resource, especially since it was about half the price of the text. But I'm starting Java soon, so I was wondering if there was any Java equivalent - something with lots of short, to-the-point examples and good explanations. 'Practical C++ Programming' also had some exercises at the end of each chapter, whicch would be nice, but aren't necessary."
This discussion has been archived. No new comments can be posted.

Good Java Books for Beginners?

Comments Filter:
  • I was going to make some snide remark along the lines of "the best book for someone wanting to learn Java would be a Python manual!", but this is a pretty slow thread so constructive criticism would probably be more welcome. Oh well. :)

    I really liked the previous editions of O'Reilly's Java in a Nutshell [oreilly.com] and Java Examples in a Nutshell [oreilly.com]. My job doesn't involve Java (thank the gods! :), so I haven't had much use for them, but still they sit on my bookshelf, and my co-workers that do program in Java have either borrowed both of them repeatedly or have copies of their own. (The same author, David Flanagan, is also the author of a couple of O'Reilly's JavaScript books, but that's not what you're looking for here.)

    (Ok sorry I can't resist -- my favorite lame Java bashing line: "Java has all the graceful simplicity of a systems language like C with the incredible performance of a scripting language like Python. That is to say, it's ugly as hell & slow as shit." Personally, I say if you're better off going with ugly but fast, like C, or pretty but slow, like Python. Java is the worst of all worlds, remarkable mainly for the dexterity with which Sun's marketing department has shoved this terrible language down our collective throats.)

    But, like I say, I'm trying to be constructive here :). Less sarcastically, the Nutshell books are great, both as a learning tool and as a refernce later, after you're comfortable with the language. The same applies with other books in the series too.

  • by selectspec ( 74651 ) on Tuesday June 05, 2001 @06:28AM (#177153)
    Anyone who knows me (all 2 of them) would tell you that I am a book freak. I love tech books, and I learned everything I know about engineering pretty much from books alone. Especially with C and C++. There are so many great books on C and C++, I could recommend a wonderful list.

    However, Java is a different deal all together. First of all, if you are familiar with C++ you now about 90% of Java right of the bat. So you don't really need a "from scratch" Java book. All you really need is reference material, and some basic guides on how key things work in the JVM, like threading, synchronization, etc.

    My recommendation is the web on this one. Download the latest JDK (1.3 or 1.4). That is full of great references, API's, HOWTO's and guides. This will be the source of 95% of your Java knowledge.

    Next, I'd start checking out C/C++ User's Journal's Java Solutions [cuj.com]. You can subscribe to the magazine, but frankly I'd stick to the online version. These guys are C++ freaks who talk about java from the C++ perspective, so you will feel at home with the discussions there.

    The only books that I would recommend, are for specific applications. For GUI work, get O'Reilly's Java Swing, and Topley's Core Swing Advanced Programming. Either one will do; they are both excellent. For Serlvet's, O'Reilly's Java Servlets is OK, but slightly out of date (maybe mine is and they have updated). Also, Professional JSP by Wrox is excellent for both serlvet and JSP work (even touches on EJB).

    What is interesting for me about Java, is that I find myself using online resources much more than I ever do with C/C++ applications. Java documentation is so standardized (javadoc) that it lends well to this approach.

  • A good beginner's book on Java is Wrox's Beginning Java 2, by Ivor Horton. It has a couple of chapters that are not well put together (JDBC, I/O), but the book is really good at introducing you to the syntax, the mode of thought, etc, particularly for someone who does not have much programming experience.

    Bruce Eckel's Thinking in Java is a great book for introducing C/C++ programmers to Java, and some of the coverage is excellent. However, some of what Eckel says is just plain wrong, particularly his coverage of Servlets. But that's okay, since you'll want subject/API-specific books by the time you get to those areas anyway.

    Good servlet/JSP coverage is quickly had from the Wrox books: Professional JSP 2nd ed., Professional Java Server Programming J2EE ed., etc. Also, staples like Jason Hunter's Java Servlet Programming and Hans Bergsten's JavaServer Pages from O'Reilly are quite good, though less bang (ie, pages) for the buck.

    Java in a Nutshell is an essential reference, but a really sucky introductory tutorial.

    The best JDBC book I know of is the JDBC API Tutorial and Reference, 2nd ed. Avoid O'Reilly's JDBC book, it just isn't anywhere near as good, and the examples don't make much sense.

    I've heard good things about Java IO and Java Networking by Elliott Rusty Harold from O'Reilly, but I've not had the chance to pick them up. Brett McLaughlin's Java and XML is good, but wait for the next edition.

    If you are (or become) serious about Java (or any other OO language), you would do yourself a HUGE favor to pick up the Gang of Four's Design Patterns.


    ---Good luck!
  • Try online. We are web users, right?
  • Ive read Java Gently ( http://www.cs.up.ac.za/javagently/ ) which was very simple and also used the book by Dietel and Dietel which was vast, and had loads of code i could borrow.

    As someone who has already learnt C you should already know about data stuctures and all the computer science basics, so a vast reference book would like the Dietel and Deitel would probably suit you better than books like Java Gently which are more about teaching you how to program.

    Dont buy a "For Dummies" book borrow it from the library and copy any code/toy programmes that interest you but i really think they are a waste of money.

    You should of course check out the resources provided by Sun ( http://java.sun.com/ )
    Definately give the turorial a look
    http://java.sun.com/docs/books/tutorial/index.ht ml

    java programming would be a lot harder without having the full API close to hand
    http://java.sun.com/j2se/1.3/docs/api/index.html

    best of luck
    and remember writing portable, well documented, well structured reusable code is not a bad thing.
  • As a complete beginner at programming, I found two books particularly useful for coming to grips with Java and object-oriented programming generally. One which has already been mentioned is the Ivor Horton book "Beginning Java 2" published by Wrox Press. Another is "Just Java 2" by Peter Van Der Linden. If you're already an experienced programmer, you should probably go with Bruce Eckel's "Thinking in Java".
  • I would second the recommendation for "Just Java 2" by Peter Van Der Linden. It's clearly written, (with humorous interludes!) and actually explains the ideas, unlike some books that just give a dry language reference with no context or rationale. He is also honest about some of Java's shortcomings, which is useful.
  • I just bought Learning Java from O'Reilly. Really good book, lots of good examples, I am very happy with it so far.

    The only minor fault is that some things where you might want to branch into a specialised topic it covers very lightly and then recommends another O'Reilly book for that topic. I guess that is OK though, because it does cover a lot of stuff.

  • Go to the local bookstore and spend an afternoon in the Java section. Choosing to learn Java could have an immense impact on your career as a programmer, so you might as well take it seriously.

    There is no single book that is going to do it for everyone, and not all people learn the same way. You might as well spend the time reading over the first few chapters of several books, and figure out which writers you retain information with, which ones present ideas in ways that you can understand them, and which ones were put out by companies looking to expand their booklists. Also, you might as well get used to the idea that you'll probably want two books (at least), one which is a beginner's book and a second which will probably act as a complete reference. Their roles will be different -- one's purpose will be to get your feet wet and the other's will be for speedy knowledge lookup once you know what you're doing. Chances are, depending on what type of programming you want to get into, you might need a third Java reference specifically for that topic (ie: servlets, database aps, etc.).

    Stay away from For Dummies books. I picked up one that had typos in the code listings that no "Dummy" would have been able to figure out (like, forgetting to pass an argument by its address -- that's C++ related but you get my drift, hopefully).

    I'm personally very wary of books that attempt to be both beginner's books AND complete references (Deitel and Deitel in particular put me on edge -- they try to do both and come up short in both, they tend to be too involved for beginner's level and too jumbled and disorganized to be decent reference books, imo).

    I think multiple texts with multiple points of view are really good for putting a language into perspective. Besides, you'll also get exposed to different coding styles and techniques, which will be useful in the long run. For this reason, don't discount online references. They probably aren't the greatest primary material, but the more examples you're exposed to, the better.

  • Despite its bad reviews on Amazon, Mastering Java 2 [amazon.com] is an excellent resource for beginner to export.

    It starts assuming you are familiar with programming concepts, but not with Java, and covers the bases from there. The first 8 chapters or so are dedicated to the groundwork: Java syntax, objects, concepts, all the way through to threading. There is extensive coverage of the AWT and (IIRC) Swing, and a good rundown on IO streams later in the book. It also introduces RMI, CORBA and other technologies enough to impart some understanding so you can get going on your own or with 'net references.

  • I can also recomend this book. I bought the first edition when i started learning java and find the book very good.

    It is very easy to read and goes very deep without getting complicated. I still read it from time to time and i have bought the second edition now wich has an excellent chapter on the Collection interfaces.

  • The place where i have learned 80% of everything i know today :)
  • I started Java not so long ago and this book [mindview.net] was recommended by a friend who works with Java at Sun. I was looking for a thorough introduction to the language and that's what I got. I wouldn't say that the examples are concise, but the writing is superior and you will learn the required concepts. Exercises at the end of every chapter are included. The solutions are available at bruceeckel.com [bruceeckel.com]. Best of all, the author has put the book online, so you can peruse it without dropping any cash.

You can tune a piano, but you can't tuna fish. You can tune a filesystem, but you can't tuna fish. -- from the tunefs(8) man page

Working...