Master Java with these introductory books

Do these newly released books for Java beginners live up to their predecessors?

Introductory Java books are a rather popular bunch. If you're interested in Java programming, you have to start somewhere. Most people pick up at least one book to get them started. More popular ones are those that have been around since the beginning of Java time -- close to six years now. Core Java (Prentice Hall, 2001) is one of those books and is already up to its fifth edition. Does anyone else remember when this book was only one volume and 622 pages? It's now spread over two volumes with more than 1,700 pages. While I don't mean those earlier books aren't any good (I'm working on the fourth edition of my own Mastering Java 2), sometimes a book's first edition is its best version, as the author isn't trying to jam new content into an old structure.

In this article, I'll review six introductory texts for Java. All of these books are first editions, not rewrites, and have all been released within the last year. I'll reveal if any of these books stand up to the older set of updated, introductory Java texts.

In alphabetical order, the six books reviewed here are:

  • Beginning Java Objects, Jacquie Barker (Wrox, November 2000)
  • Essentials of the Java Programming Language, Monica Pawlan (Addison-Wesley, May 2000)
  • Java 2: A Beginner's Guide, Herbert Schildt (Osborne, December 2000)
  • Java 2 Weekend Crash Course, Julio Sanchez and Maria Canton (Hungry Minds, December 2000)
  • Java: Your Visual Blueprint for Building Portable Java Programs, Dr. Ernest Friedmann-Hill (Hungry Minds, February 2001)
  • Professional Java Programming, Brett Spell (Wrox, December 2000)

Table 1 below provides a quick review of the main characteristics of the six books:

Table 1: Introductory Books Overview
 Beginning Java ObjectsEssentials of the JPLJava 2: A Beginner's GuideJava 2 Weekend Crash CourseJava: Visual BlueprintProfessional Java Programming
Price9.994.959.999.996.999.99
Total Pages6603005704303001,100

CD-ROM /

Source Code on Web

No / YesNo / YesNo / YesYes / NoYes / NoNo / Yes
Java Version1.31.21.31.2*1.31.3
OO BasicsExcellentAverageGoodAveragePoorPoor
Language BasicsPoorPoorExcellentGoodGoodPoor
Client SideGoodGoodPoorAverageAverageExcellent
I/OAverageAverageAverageGoodAverageAverage
ThreadsNonePoorAverageNoneAverageGood
NetworkingNoneAverageNoneNoneAverageAverage
Server SideNoneGoodNoneNoneNoneAverage
LevelObjects BeginnerBeginning - AdvancedBeginningBeginningBeginningIntermediate - Advanced*

Scale: None, Poor, Average, Good, Excellent

A star (*) in a field means the review of the specific book provides further details of the ranking.

For the most part, the above table is self-explanatory. After "Java Version," the rows describe the level of coverage, if any, each book offers on that topic. "Client Side" includes the coverage level for such topics as applets, AWT, Java 2D, and Swing. "Server Side" includes coverage of JDBC, servlets, JavaServer Pages (JSP), RMI, and the rest of the Java 2 Enterprise Edition (J2EE). The final row describes the appropriate reader level.

A more detailed review of the individual books follows, including a comparison to the older beginner books. Is it time you stray from the classics and try something new? Read on and find out. Beside each book's title is a star rating, which is based on my review of the book's quality, level of topic coverage, and appropriateness for its target audience. One star is equivalent to a poor rating, and the highest rating (five stars) translates to exceptional coverage.

Beginning Java Objects

Jacquie Barker's Beginning Java Objects takes an objects-first approach at teaching Java programming. You'll learn how to do object modeling and how to translate that model into well-designed Java code. With a student-registration-system design serving as the backbone, the text works well as the lesson plan for an object-oriented methodology class.

If you are new to Java programming, Beginning Java Objects offers a taste of Java in the first chapter, and provides more depth 12 chapters later. For most readers, the taste is sufficient to get them started with Java and get them through the code used in the early chapters, which deals with modeling the system. Combining these two chapters (one and thirteen) is all the programming language explanation found in most introductory Java texts. Beyond the language, the only libraries covered in any depth are I/O and Swing. One surprise with the Java code was the book's use of Hashtable and Vector instead of the newer Java Collections Framework classes.

This book shines mostly in its coverage of object-oriented programming, which typically takes up only one chapter in an introductory text. You'll learn all about object modeling (even though Barker can't decide between one l or two in modeling). From use cases and object diagrams to sequence diagrams and collaboration diagrams, you'll have a good grasp on the basics of Unified Modeling Language (UML) design by the time you are through reading Beginning Java Objects.

Essentials of the Java Programming Language

Essentials of the Java Programming Language by Monica Pawlan may already be familiar to you. It has been available online on Sun's Java Developer Connection for close to two years now. Consider the printed version a polished edition of the online offering. This tutorial takes you through the process of creating a general-purpose e-commerce system.

Its tutorial-based approach starts out with basic explanations of creating some simple Java programs. You get step-by-step instructions for creating an application, applet, and servlet. The explanations are interspersed with descriptions of such Java basics as classes, methods, and packages. Soon afterwards, topics jump into JDBC, RMI, socket communications, and internationalization, before concluding with an introduction to object-oriented programming (OOP) and an appendix on cryptography with Sun's Java Cryptography Extension (JCE).

While the last chapter on OOP seems a little out of place, with such varied lesson levels, the book's target audience seems unclear. Going from extreme hand-holding in the initial lessons, through the use of Oracle OCI 7.3.4 to setup the JDBC chapter, and onto creating a complex RMI system, I can't tell if Pawlan is targeting someone new to Java or an experienced veteran who needs help creating a working distributed system. As the cover states, the application "illustrates many of the Java 2 platform's most important elements," which seem to be the qualifying justification for including every concept in the book. Unfortunately, there isn't sufficient explanation on such topics as JDBC to create your own programs with the API after reading the book.

The text itself is well written and the created system demonstrates some good concepts on such topics as internationalization and RMI. The book would probably work out well for someone interested in learning about some server-side Java concepts with little explanation beyond the hands-on tutorial.

Java 2: A Beginner's Guide

Java 2: A Beginner's Guide by Herbert Schildt provides a goal-based approach to teaching the necessary skills to getting started with Java. Providing a language-first approach at teaching Java, Schildt explores the fundamentals of the language before delving into classes, objects, and inheritance. Full of many different learning aides, the beginning Java programmer should pick up Java quickly and get a feel for how well they are doing with provided self-assessment checks.

Broken into 12 modules, Java 2: A Beginner's Guide's self-paced approach describes the core Java concepts, like the language fundamentals and object basics, quite well. With each concept are short one-minute drills with plenty of annotated code examples. There are also short projects interspersed throughout, with step-by-step walkthroughs that take you through creating a solution. Projects range from the simple to the complex, from demonstrating finalization to creating a disk-based help system. Schildt's approach works quite well, especially for the new Java programmer who needs a step-by-step guide.

Beyond the language and object fundamentals, the guide starts to look at some of the standard Java libraries. This is limited to the final three chapters. The libraries covered are I/O, multithreading, and applets. The I/O chapter has you work with byte and character-based I/O, while the multithreaded programming chapter has you create multiple threads, deal with synchronization, and send messages between threads. It even has a short write-up on suspending threads without using the language's deprecated features. The applets chapter is somewhat of a catchall chapter. Besides describing the applet architecture, it explains event handling and some new keywords like volatile and strictfp. Anything dealing with AWT or Swing components as well as drawing with Java is noticeably absent.

Finally, Java 2: A Beginner's Guide ends with two appendices. The first includes answers for the end of module questions, while the second describes Java's documentation comments syntax. The book's questions and answers should help readers get accustomed to testing for certification (though without multiple-choice answers), while the javadoc appendix provides a reasonable level of coverage of the javadoc tags, including the newer serialData and serialField tags.

Java 2 Weekend Crash Course

The premise for Java 2 Weekend Crash Course by Sanchez and Canton is that, given 15 hours of your time, you'll go from absolutely no Java programming experience on Friday to being able to fill that new Java position on Monday morning, or at least be able to sound reasonably competent for the job interview. The 15 hours of learning spreads across 30 lessons. You will need some programming background before tackling the lessons, as it isn't meant as a first book on programming. The lessons run the gamut from programming fundamentals and objects, through data structures, I/O, and graphics.

The 30 lessons are broken down into six parts. The first part describes loading and installing the JDK. I mention this primarily because it is the only book reviewed here that actually walks you through the process of downloading, unpacking, and setting your PATH and CLASSPATH. Given the book's target audience, these are welcome lessons. One oddity though is that the book says that Java 1.3 is the latest version, yet it has you install the Java 1.2.2 JDK. With a December 2000 release date, Sanchez and Canton should have had sufficient time to update the content to Java 1.3.

In the book's second part, the authors explore the language basics, before jumping into objects and recursion in Part 3. They do a good job of explaining both topics, with more emphasis on learning the language over learning about objects. Interspersed throughout are end-of-session quizzes with end-of-part reviews. The reviews have answers in an appendix but the quizzes only have pointers to answers in earlier sections. Lots of graphics are used to explain the basics, including flow charts -- something I haven't seen in some time.

Sanchez and Canton introduce Java libraries in Parts 4, 5, and 6. I was very disappointed with Part 4's data structure coverage. Instead of introducing the Java Collections Framework, Sanchez and Canton have you define your own linked list, stack, queue, and tree classes. While I might see a reason for this in a data structures book, you still need to learn about the ever-present libraries to become productive with Java. The I/O coverage is spread across multiple parts, initially exploring console input, and primarily dealing with character input. It even covers file operations and parsing data into tokens. The client-side programming coverage is a little mixed up: you'll learn about components, painting, fonts, and images, but not about event handling to do anything with the components.

Throughout Java 2 Weekend Crash Course, Sanchez and Canton describe their selected topics at a level appropriate for the intended beginner audience. It reads quite well. Personally, I would have hoped for some coverage of collections and event handling, as previously mentioned, but also coverage of multithreading, which is hard to live without in the Java world.

Java: Your Visual Blueprint for Building Portable Java Programs

The first thing you'll notice about Java: Your Visual Blueprint for Building Portable Java Programs is its decidedly different presentation method. Instead of the typical large blocks of text to explain concepts interspersed with code examples and figures, the book is primarily broken down into two page spreads designed to explain concepts visually. Across the bottom of the two pages, you get visual pointers for key topics with callouts from the figures (usually screen shots) walking you through the important steps. The top left of the page has a brief paragraph describing the topic, than on the top right you'll find either code fragments or interesting tips to help you learn a little more about the specific topic. The presentation definitely encourages you to follow the screen dumps with their boxed-off areas and numbered steps. If you like to learn things visually, you'll really appreciate Dr. Friedman-Hill's approach.

1 2 Page 1