Slashdot Mirror


Java Developers Almanac 1.4 Vol. 1

Jason Bennett writes "The Java Developer's Almanac is an interesting cross-breed of a book. On one hand, it's a reference book for the entire Java 1.4 API, complete with a listing for every method in every class in the API. On the other hand, it's a mini-tutorial, as it comes with myriad examples of how to use various Java classes. In the end, though, it's a book geared toward the advanced Java developer, especially one facing a new part of the API who needs a little guidance." Read on for his review. Java Developers Almanac 1.4 Vol. 1 author Patrick Chan pages 1007 publisher Addison Wesley rating 7/10 reviewer Jason Bennett ISBN 0201752808 summary A concise reference to every class and method in Java 1.4, with examples for many.

What's the Book About?

The Almanac is divided into four main parts: packages, which covers every package in the core Java distribution, with the exceptions of the AWT, Swing, and printing; classes, which lists every class in alphabetical order, including all of its methods and fields; topics, which details the changes between each version of Java; and cross-reference, which allows you to look up every class, interface, and member type in Java 1.4.

Section 1, the package list, gives you every package in Java 1.4, every class inside those packages, the top-level description of the classes (from Sun's JavaDoc), a note of what JDK version the class was born in, an abstract/final indicator, and a hierarchy of the classes in the package. If this were all, it might be a nice, basic Java reference.

In addition to the strict listing, however, are hundreds of examples of how to use the classes; some basic, some obvious, and some you probably haven't seen.

The examples are extremely handy, if only to point out various utilities included with Java that you might otherwise not know about. With over 500 examples in the book, there's probably one you haven't seen or want to understand better.

There's also a website with all the code available at javaalmanac.com, so you don't have to type in every example you want to use in your code.

Section 2 provides a listing of every class in the covered packages in alphabetical order, along with all the signature of every public method in those classes. The book also cross-references every example in part 1 for each method. So, if you want to know how to better use ResultSet.afterLast(), you only need find the ResultSet class, and next to the afterLast() method are the two examples that use that method. With this easy organization, it's very straightforward to find any example you're looking for.

Part 3 goes through every major JDK release, starting at 1.0, and tells you everything you could possibly want to know about that release. You can find a statistical analysis of each release, including how many packages, classes, and members there are, how many classes in each package, new and removed classes and methods, deprecations, and all defined exceptions. I've certainly never seen a better or more compact reference on the differences between the JDKs.

Finally, part 4 gives a complete cross-reference for every class, interface and member mentioned. If you want to find every class that throws a ParseException, this is the place to find it.

What's Bad?

The one bad thing that strikes me about this book is actually just a simple question: Why should I use it when most of this information is at my fingertips in an IDE? Sun's JavaDoc is nicely thorough, and includes most everything in this book, the examples being a notable exception. Parts 3 and 4, of course, are not at all included in the JavaDoc, but I'm not sure how often I might need those sections.

So What's In It For Me?

If you're a down-and-dirty professional Java programmer, this book may very well be useful to you. The examples are quite handy, and as a reference to Java, it covers most anything you might need. Much of the information in the last two sections is hard to find in one coherent compilation. At $25 MSRP, it's an excellent value for all the information packed into the book.

Table of Contents
  1. Preface
  2. Part 1: Packages
  3. Part 2: Classes
  4. Part 3: Topics
  5. Part 4: Cross-reference

You can purchase Java Developers' Almanac 1.4 Vol. 1 from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

8 of 111 comments (clear)

  1. Cheaper on Amazon by ProlificSage · · Score: 4, Informative

    Check it out here for $17.99 USD.

    --
    Real software engineers regret the existence of COBOL, FORTRAN and BASIC.
    1. Re:Cheaper on Amazon by RocketJeff · · Score: 2, Informative
      If you're doing price comparisons for books, Best Book Buys can't be beat.

      A search for The Java Developers Almanac v1.4 by ISBN shows that there are several shops (including my favorite, BookPool) with lower prices then Amazon.

  2. useful but a lot of redundancies by hashmap · · Score: 3, Informative

    I found the Almanach to be extremely useful in displaying the intended usage for many of the classes. Java builds on numerous desing patterns that can be overwhelming for a novice.

    For example just browsing the API I had a hard time figuring out how to use the crypto package to encrypt data. The almanac shows that in ten lines.

    In many respects the Almanach is superior to the "Java Cookbook" by O'Reilly because this latter spends way to much time on trivial implementations.

    The aspect that I don't like is the huge index(or listing at the end whatever that is). I found that to be totally useless. There are dozens of methods with identical names anyway so finding the one you need is easier to do on the package level in table of contents. This index makes the book unnecessarily bulky.

    i.

  3. very helpful book by nuffle · · Score: 3, Informative

    I have a copy of one of the earlier editions, and it quickly became one of the most ragged and tattered computer books i owned. Although there is more detailed info available in javadocs, having all the classes, methods, and members available in a print is very helpful. I found it much easier to quickly thumb to a certain class when I couldn't remember the order of some arguments or the name of an attribute.

    Just note that no method or attribute descriptions are included in the book, just the method signatures or the attribute types. You have to already know basically what everything does (or be able to deduce it from names), and just use this to jog your memory. So despite what some other posters say, this isn't a beginner's book.

  4. Why would I buy the javadoc? by peterpi · · Score: 4, Informative
    "Section 1, the package list, gives you every package in Java 1.4, every class inside those packages, the top-level description of the classes (from Sun's JavaDoc), a note of what JDK version the class was born in, an abstract/final indicator, and a hierarchy of the classes in the package. If this were all, it might be a nice, basic Java reference."

    No! If the book was just what's here, it would be just a copy of information of information that is freely available on the internet!

    So many books on Java seem to include a copy of the Javadoc documentation. It's just a con to make the book look bigger.

    Well done Bruce Eckel for resisting this cheap tactic in the brilliant Thinking in Java.

  5. Re:Don't waste the money by hosebee · · Score: 3, Informative
    In my experience, you buy a book detailing the Java API, then in half a year, it changes and your book is out of date and you can't use it for fear that you might end up using a depricated method.
    In my experience, you might want to get more experience.
    • All the major java compilers have a flag to alert the user when he/she is using deprecated methods.
    • The fact that deprecation is part of the language should tell you that Sun realizes forcing abrupt API changes is counterproductive.
    • If you start/started with 1.2 or later, the number of deprecated methods you are likely to see or have to migrate is in reality very small.
    Having said that, I do agree with you that you shouldn't waste the money; only because the full APIs are free (and usable via HTML) from Sun. Only someone with a paper fetish may want a hardcopy of the API. You should buy a book that deals in depth on a topic concerning you (JDBC, threads, beginning, etc.)

    I carry knowledge of Java in my head for the same reason I carry a Leatherman: it's no good approaching every problem with only a hammer.

    Remember, paper is just a tree recycled.
  6. Better than a copy of the API by wormbin · · Score: 3, Informative

    I see lot's of post saying things like why would I want to read this when I have the free 1.4 API javadocs online?

    I agree. The best books aren't copies of the API that tell you all the good things about the language. The best books show you the warts and gotchas of the language. For C++ this book was Scott Meyer's Effective C++. Java has a similarly named and equally useful book Effective Java which I have found invaluable. Not as good but still worth the purchase price is Java Pitfalls

    I haven't read More Java Pitfalls Has anyone read this? Is it any good?

  7. Let me save you $24.99... by dconder · · Score: 4, Informative

    Section 1, In addition to the strict listing, however, are hundreds of examples of how to use the classes; some basic, some obvious, and some you probably haven't seen.

    All the examples.

    Section 2 provides a listing of every class in the covered packages in alphabetical order, along with all the signature of every public method in those classes.

    Java 1.4 spec.

    Part 3 goes through every major JDK release, starting at 1.0, and tells you everything you could possibly want to know about that release.

    I guess you would have to figure this part out yourself, but what real value is it anyway?

    I know, I know, it's nice to have this in book form, but the sooner you learn how to parse through what javadoc provides, the better. Especially if you are serious about learning/using java, you need to become familar with javadoc. Plus the APIs are still changing, and the Sun website will always have the most up-to-date information. It takes a while to get used to looking at documentation online, but once you are familar with it, you will be proficent in finding what you want in no time.

    The real value of the books seems to be the examples, but they are all on-line too.

    Seriously, don't buy this book. If you want something that will truely make you a better Java programmer, get Effective Java. That book is worth its weight in gold.