Online Book Reader

Home Category

Think In JAVA (the third edition) [2]

By Root 15898 0
but also in groups and, as a planet. I've heard it suggested that the next revolution is the formation of a kind of global mind that results from enough people and enough interconnectedness. Java may or may not be the tool that foments that revolution, but at least the possibility has made me feel like I'm doing something meaningful by attempting to teach the language.

Preface to the 3rd edition

Much of the motivation and effort for this edition is to bring the book up to date with the Java JDK 1.4 release of the language. However, it has also become clear that most readers use the book to get a solid grasp of the fundamentals so that they can move on to more complex topics. Because the language continues to grow, it became necessary—partly so that the book would not overstretch its bindings—to reevaluate the meaning of “fundamentals.” This meant, for example, completely rewriting the “Concurrency” chapter (formerly called “Multithreading”) so that it gives you a basic foundation in the core ideas of threading. Without that core, it’s hard to understand more complex issues of threading.

I have also come to realize the importance of code testing. Without a built-in test framework with tests that are run every time you do a build of your system, you have no way of knowing if your code is reliable or not. To accomplish this in the book, a special unit testing framework was created to show and validate the output of each program. This was placed in Chapter 15, a new chapter, along with explanations of ant (the defacto standard Java build system, similar to make), JUnit (the defacto standard Java unit testing framework), and coverage of logging and assertions (new in JDK 1.4), along with an introduction to debugging and profiling. To encompass all these concepts, the new chapter is named “Discovering Problems,” and it introduces what I now believe are fundamental skills that all Java programmers should have in their basic toolkit.

In addition, I’ve gone over every single example in the book and asked myself, “why did I do it this way?” In most cases I have done some modification and improvement, both to make the examples more consistent within themselves and also to demonstrate what I consider to be best practices in Java coding (at least, within the limitations of an introductory text). Examples that no longer made sense to me were removed, and new examples have been added. A number of the existing examples have had very significant redesign and reimplementation.

The 16 chapters in this book produce what I think is a fundamental introduction to the Java language. The book can feasibly be used as an introductory course. But what about the more advanced material?

The original plan for the book was to add a new section covering the fundamentals of the “Java 2 Enterprise Edition” (J2EE). Many of these chapters would be created by my friends and associates who work with me on seminars and other projects, such as Andrea Provaglio, Bill Venners, Chuck Allison, Dave Bartlett, and Jeremy Meyer. When I looked at the progress of these new chapters, and the book deadline I began to get a bit nervous. Then I noticed that the size of the first 16 chapters was effectively the same as the size of the second edition of the book. And people sometimes complain this is already too big.

Readers have made many, many wonderful comments about the first two editions of this book, which has naturally been very pleasant for me. However, every now and then, someone will have complaints, and for some reason one complaint that comes up periodically is “the book is too big.” In my mind it is faint damnation indeed if “too many pages” is your only gripe. (One is reminded of the Emperor of Austria’s complaint about Mozart’s work: “Too many notes!” Not that I am in any way trying to compare myself to Mozart.) In addition, I can only assume that such a complaint comes from someone who is yet to be acquainted with the vastness of the Java language itself and has not seen the rest of the books on the subject. Despite this, one of the things I

Return Main Page Previous Page Next Page

®Online Book Reader