Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

<em>Core Java</em> not just for experts

Prentice Hall book thoroughly covers basics and advanced topics

  • Print
  • Feedback
Just a few short months ago, if you wanted to learn Java you had very few choices. If you were a hard-core language junkie, you could wade through the technicalities of the Java Language Specification available from Sun, and then figure out the rest on your own. If that didn't appeal to you, your only other choice was to suffer through the inconsistencies and limitations of a handful of books that were out of date almost by the time they reached the bookshelf.

Now the opposite holds true. There are more than 100 books on Java, many seemingly motivated simply by the desire to hitch a ride on the Java bandwagon. After digging myself out from under this avalanche, it is a pleasure to see such a carefully crafted and thorough book as Core Java.

Core Java's opening chapters contain the most complete and well-organized introduction to Java that I have read. They cover basics of the language and of the object-oriented model, and include overviews of the environment and the tools for working with Java. This book targets advanced programmers, but Java newcomers or novice programmers will find everything they need to get started with Java in these chapters. The material is presented in a detailed, step-by-step manner that provides a continuous path from ignorance to Java bliss.

The chapters on the more advanced features of Java are equally well organized and written. The chapter on exceptions provides an introduction to when and why exceptions are used, coverage of the specifics of the exception mechanism in Java, and a number of useful tips on exception handling such as "Exception handling is not supposed to replace a simple test" (p. 434). It also provides some useful debugging techniques, such as the "MessageCracker" class (p. 437), which lets you spy on Abstract Windowing Toolkit (AWT) events.

The chapter on streams (the java.io package) takes the reader from the basic principles to a detailed implementation of file-based persistence using Java streams. Networking also provides a gentle introduction and then ramps up to full-powered applications, including how to interface Java applets to CGI scripts.

The multithreading chapter is, again, one of the best I have seen. It provides an excellent overview of the basics, and then goes on to provide detailed examples of the issues that must be dealt with when programming in a multithreaded environment. I especially liked the example that illustrates race conditions and the need for synchronization among threads (p. 524). Even if you have never programmed with threads before, this chapter makes their use eminently clear.

The book also contains three chapters that cover the AWT and how to write applets. These chapters contain numerous useful examples, but they are not as well organized as the other material. They don't directly supply an understanding of the overall organization and specifics of the AWT; rather, they seem somewhat scattered, and require you to dig for the core information. Still, they present a lot of useful information and techniques.

  • Print
  • Feedback

Resources