on September 15, 1999
This book goes way beyond the "tips and tricks" explained in so many other Java books. It explains in exhaustive detail how and why one should use the object oriented features of the language to produce professional-grade code. It explains many finer points of scope resolution, syntax, and class design which I have never seen covered anywhere else.
It does not attempt to cover every nook and cranny of the standard libraries, and chooses instead to use the most important ones to illustrate how things work in Java, and to demonstrate instances of good object-oriented design and coding practices. The whole idea is that, once you understand the underlying principles of the language, you'll be capable of using the free Java API documentation without needing everything to be explained to you any further.
I have only two minor quibbles. One is that the examples he provides often strike me as overly simplistic. I understand the need to keep code samples short and sweet, but I find it harder to remember the significance or the relevance of a coding construct when it is just used to push around "dummy" data members for the sake of demonstration. Longer, more realistic code samples would have helped me assimilate and retain the material better.
The other quibble is that I find the wording of some sentences to be a little vague. I sometimes find myself reading the same sentence several times before I feel that its meaning is clear to me. But this doesn't happen often.
Some other reviewers have panned this book. Maybe they were expecting that learning Java was going to be easy. It is not and it never will be. If you feel that you have some understanding of how to hack in Java, C or C++, and now you want to become a skilled object-oriented Java software engineer (and you're willing to put in the time and effort required to achieve this), you will find this book to be worth many times its cover price.
on April 12, 1999
This is a preview of my forthcoming review. IGNORE MY PREVIOUS POSTING BELOW, IT'S USELESS WITHOUT THE TABLE!
I've written a comparative review of the following books:
Ralph Steyer: Java 1.2 Kompendium (Markt und Technik; ISBN: 3827253179) (German!)
Cay S. Horstmann, Gary Cornell : Core Java 2, Volume 1: Fundamentals, 4/e (Prentice Hall; ISBN: 0130819336)
Peter van der Linden: Just Java 1.2 (4th ed, Core series, Sunpress/ Prentice Hall; ISBN: 0130105341)
Bruce Eckel: Thinking in Java (Prentice Hall Computer Books; ISBN: 0136597238; with the new chapter on Collections).
Aaron Walsh: Java 1.2 Bible (IDG Books Worldwide; ISBN: 0764580302).
Look up the review of the five books from Amazon - I had to remove all the columns of the other 5 books from the table below b/c Amazon's HTML parser doesn't understand table tags. In order to get a clear, (hopefully) objective view of all the books,
I've also read Jamie Jaworski's Java 1.2 Unleashed (Sams.Net, 1998; ISBN: 1575213893) book before the test, but, as the book is only intended for experienced programmers interested in additional and enterprise APIs and not for beginners, I dropped it from the test entirely. It would have been unfair to test such an expert-only book in a review of beginners' books.
Bruce Eckel: Thinking in Java
The only one book in the test that can be downloaded straight from the Net. This also has a positive impact of this book's great success. And this book is exceptionally good for being free!
The book has a lot of references and notes about both C++ and the earlier Java versions. The latter is painfully missing from the latest Core Java.
Eckel's OOP explanation is not as comprehensive as that of Linden. You aren't guaranteed to understand OOP only from this book, unfortunately. As a second book, though, Eckel's book is great as it adds a lot of additional information on OOP. His was the only book to explain how and why the implicit/explicit super() method invocations take place; same stands for the explanation of why signatures don't contain the return value (overloading).
As far as basic language constructs are concerned, Eckel wrote a far more comprehensive chapter (see the remarks below the table - I especially loved the easy-to-understand examples of how labeled break/continue work.).
Chapter 4 is where the real work starts (OOP, distinguishing overloaded methods, this, static, constructors, static initialization, arrays). Introducing constructors is one of the best explanations I've ever read - unfortunately, not many OOP primer books emphasize constructors' being 'only' methods to initialize an object's variables. A perfect introduction should also emphasize why constructors were chosen to be tied tightly with the class they belong to (not to forget to call the method that previously were in charge of initializing the instance variables). Most other books reviewed lack this kind of an introduction, they start off by telling the reader 'constructors are for initialization' and don't even try to emphasize they're just a convenience invention.
The section on arrays was pretty short and lacked the explanation of multidimensional arrays' memory map. It was the only book to mention that not only the last one, but the last n indices of multidimensional arrays can be left empty when creating an array.
Chapter 7 is almost entirely devoted to polymorphism and inner classes. The discussion of inner classes rocks, it's by far the most comprehensive introduction I've ever read. It's only Just Java's explanation that is as comprehensive as this one because it systematically groups the different types of inner classes and explains them separately. The other books also try to group the different kinds of inner classes, but mostly without any success. Authors of future Java books should learn a lot from both early C++ books and Linden's being utterly systematic.
The section on OOP, as I've already said, lacked the comprehensibility of Just Java. If the author (as Linden himself or the authors of most C++ intro books) had chosen to show how an OOP structure could be implemented in a non-OOP language, the reader would understand the basics of OOP much easier. This is a lethal flaw in all books reviewed, except for Just Java.
Chapter 8 discusses Java's collection classes. It introduces the old classes, but, fortunately, the new Collection classes aren't forgotten - they're discussed at the end of the chapter. Eckel's explanation of the Collection classes are extremely easy-to-understand; a magnitude better than Linden's. The other books under review don't discuss these, new classes.
Chapter 10 is devoted to streams. This chapters is pretty well written (there is a small mistake in discussing StringTokenizer: nextToken() returns a NoSuchElementException when there are no more tokens, and not an empty String), I especially loved the part on serialization. The author's example on showing whether a serialized objects can be restored without actually having the corresponding .class is really unique - I love the author's experimenting and actually making the readers experiment and not just check out the API docs or the (sometimes faulty, especially in this case - most books don't even discuss object serialization) literature. Versioning, on the other hand, isn't discussed, only mentioned.
Chapter 11 is entirely devoted to RTTI. A great chapter, a must read for advanced Java programmers. Beginners won't profit much from this subject, anyway, so the weighting of this subject is made 2 (quite small) in the table below. The author makes useful remarks about C++, especially when it comes to discussing instanceof and downcasting. He should have shown the reader why it is dangerous to access a superclass object as a subclass object, though, in order to make the readers understand why explicit cast and Java's additional checking is needed to avoid cases when there can be memory corruption if the additional methods defined in the subclass overwrite the memory area after the object. Most quality C++ books also show examples of this - in my practice (teaching Java at Sun Microsystems Hungary's Java courses and Technical Univ. of Budapest) I found it essential to show such memory maps of the objects in order to make the students understand the need for the explicit cast (and, on the other hand, why implicit type conversion is enough in the opposite direction). Nevertheless, this chapter is by far better than Core Java's sections of the same subject.
Chapter 12 discusses passing and returning objects - a very important subject for a C++ programmer. The subject isn't as important for a Java-programmer, as we don't have to write our copy constructor when passing objects to a method, so this chapter is more of a 'let's rewrite our C++ book to cover Java'. Nevertheless, interesting and important subjects are discussed - equals(), clone() etc.
It's Chapter 13 that starts discussing AWT. Unfortunately, the discussion here is flawed - all AWT components are introduced by using the old event model. The author later rewrites all the examples to use the new event model too - but it'd be far better not to use the old event model at all. What is more, there is not a single screen shot in the entire book. The section of layout managers is pretty badly written -no BorderLayout constants are mentioned; there're sentences like 'The BorderLayout is the default manager for applications and dialog' etc. GridBagLayout isn't discussed at all (I don't consider this a lethal flaw - I don't teach it either and find it easily replaceable by using subpanels with Border/FlowLayout). The recommended coding approaches, on the other hand, are worth reading - the discussion of creating lightweight components (still existing in Core Java 3rd ed Vol1 but NOT in the most recent edition) and using the AWT event queue is great. Basic clipboard operations (Core Java 3rd ed Vol2 discussed the subject much more thoroughly) and JavaBeans are also discussed here. Basics of Swing are introduced - this section is one of the worst in the book. There is no MVC and the author doesn't even describe panes in a JFrame. This chapter is one of the chapters in the book that need complete rewrite.
Chapter 14 discusses multithreading. It also describes why suspend/resume/stop are deprecated - it's also the only book to discuss this subject. Compared to SL-276, the first explanation of the deprecated stop() methods is a bit problematic, albeit the later use (and explanation) of a stop flag is OK. Explanation (and emulation) of suspend/resume isn't misleading either.
Chapter 15: java.net. Both TCP sockets and UDP datagrams are thoroughly presented (with presenting the usual multithreaded server application too). JDBC is also quite thoroughly (8 pages) discussed in the chapter, which closes with RMI (also a thorough description - it should have presented a working, large example, though, just like Core Java vol2).
Later chapters discuss design patterns at a high level (unique with a Java book! The other general Java book that discusses this subject I've read is Wiley's Programming Mobile Objects with Java
on March 16, 2002
This is not a book you can simply read. Mr. Eckel's formal academic training in physics and engineering is reflected in the character of this book and you must be prepared to approach it as a serious study and programming project at the university level of rigor. You will need lots of time if you want to "graduate". The book is very code intensive. If you don't have access to a Java development environment to step through the code examples, examine variables and methods, the state of threads, and work through the exercises then I would not recommend this book to you. The book is actually the course material for a student-oriented computer lab environment and attempting to absorb the contents of this book by reading alone would be an extremely difficult experience indeed.
The book goes deep into the workings of the language and represents a valuable review exercise for experienced Java developers, but an intense and arduous learning experience for those new to Java. Regardless of your programming experience, you will benefit from a study of this book.
The pros and cons are provided below:
Pro: The author has empathy and has seems to have anticipated readers reactions such as confused, surprised, doubtful, and then goes on to clarify. You are not left hanging.
Pro: The author explores deep concepts by introducing interesting twists and exposing various caveats in the code segments.
Pro: The chapters on threading and distributed computing are excellent and provide very insightful descriptions of the subject.
Pro: Each chapter is logically and consistently presented as Introduction, Theory, Practice, Analysis, and Exercises.
Pro: The author is able to remain subjective and even exposes some questionable Java design decisions and apparent bugs, e.g. in the Java I/O system.
Pro: The CD includes some useful code scaffolding such as the applet running framework.
Pro: A solutions guide to the exercises is (finally) available for a small fee.
Pro: The author has excellent writing and communication skills.
Pro: The code examples actually work.
Con: The paper is super cheap and gives too much light reflection. I always had to adjust the position of the book to move the reflection elsewhere. A major irritation!
Con: The use of color and UML diagrams is not provided. This makes the book rather dry and often difficult to obtain an overview of the text and code structures. At best bold text is used to highlight class and method names but this is not enough. The code in the electronic version of the book does use color, which makes it much more readable then the same code printed in the book.
Con: Program listings in monotype font make it hard to scan for key words and program blocks. Also, the code listings are packed tightly together. The resulting lack of white space makes reading the code a real chore.
Con: The next edition should be published as two separate volumes. The book contains over 1100 pages and this is already the upper limit of what most people are prepared to deal with.
Con: The section on passing and returning objects tends to ramble on forever (pages 1013 - 1061) without really making a point.
Con: The book contains far too much advertising clutter. There are 6 pages of promotional ads, 8 pages of biased reader reviews, 9 pages of legal [stuff]. I simply cut these pages out. Now the first page in my book is the overview - the way it should have been in the first place.
on March 18, 2006
This is NOT a beginner's book. The sheer size of this weighty tome is overwhelming, and it does not come with rollers. It is a great book for your second pass thru Java, certainly more so than any other book that I've looked at. I have extensive teaching experience and I do spend lots of time examing books. Eckel is a very readable and much more than competent writer as attested to by the great sucess with his previous C and C++ books. They are still great reading and studying books. For Java starters, you can't do much better than the Sierra and Bates book, 'HeadFirst Java' from O'Reilly. (By the way, at good price from Amazon). Check out their newest, Design Patterns in Java. Everything in the 4th edition of this now classic Eckel book looks more polished. In agreement with other reviewers, this book lacks a polished publishing job. Where are the pictures ? A little UML might be nice. Can we get a nicer font and less huge margins.
This review is dedicated to the memory of the Sahara Forest.
on July 5, 2000
If you have some procedural programming experience already then this book will be great for you to switch to the world of OOP. If not, then take it slow, but it can still work. I took an OOP course featuring C++ and got lost quickly, but in just a few chapters of Bruce Eckels' book, he helped me to understand what I had missed. The book starts out with a great foundation of explaining what objects are, then tells us that Everything is and object, and explains why. It explained these concepts in simple terms. The book then pays a little respect to program flow. For those who already have had programming experience, this is a quick read. Then it is back to the OOP ideas and then on into some more advanced Java topics. Excellent grouping and interesting section titles keep it a relatively light read. It covers the Java language, not just applets. That was refreshing.
on April 14, 1999
This is the continuation of my previous article, which has been crippled off at the 1000-word-boundary. It starts off with the next word where the previous article ended.
ponents (still existing in Core Java 3rd ed Vol1 but NOT in the most recent edition) and using the AWT event queue is great. Basic clipboard operations (Core Java 3rd ed Vol2 discussed the subject much more thoroughly) and JavaBeans are also discussed here. Basics of Swing are introduced - this section is one of the worst in the book. There is no MVC and the author doesn't even describe panes in a JFrame. This chapter is one of the chapters in the book that need complete rewrite.
Chapter 14 discusses multithreading. It also describes why suspend/resume/stop are deprecated - it's also the only book to discuss this subject. Compared to SL-276, the first explanation of the deprecated stop() methods is a bit problematic, albeit the later use (and explanation) of a stop flag is OK. Explanation java.net. Both TCP sockets and UDP datagrams are thoroughly presented (with presenting the usual multithreaded server application too). JDBC is also quite thoroughly (8 pages) discussed in the chapter, which closes with RMI (also a thorough description - it should have presented a working, large example, though, just like Core Java vol2).
Later chapters discuss design patterns at a high level (unique with a Java book! The other general Java book that discusses this subject I've read is Wiley's Programming Mobile Objects with Java - a real failure), some real-world examples (without Swing), JNI, CORBA. A separate chapter is devoted to comparing C++ to Java - the book excels in this area, too. Java authors should emphasize this subject in their books more. The performance comparison in appendix D rocks.
What did I compare?
I tried to evaluate each book in a comparative fashion. Unfortunately, when it's time to evaluate a book's being comprehensive AND discussing / mentioning everything with ONE rating, it's hard do decide which to prefer. Should we give a better mark to a book that is more comprehensive but less wide-reaching, that is, lacking the discussion of some features of the language? Should we do the opposite? Fortunately, there weren't many cases where this caused me headache, as, in general, the books are both comprehensive AND fully discuss everything. Nevertheless, I included a row in the table. This row evaluates each book's being both beginner-friendly (that is, whether it's intended to a newcomer) and discussing everything at much higher depth than the API docs. The higher the mark, the better suited for the target audience (beginners or the experienced) the book. These two ratings, of course, don't have to be equally high for a good book - for example, Java in a Nutshell, an outstanding reference, would hardly get a rating higher than 2 when evaluating its suitability for beginners. A book, on the other hand, that receives ratings that are both below 3, isn't intended for outstanding, far better than any other book
References in italic reference for the experienced or an introduction for beginners?
5* (1) Basics of procedural programming (w/o OOP)
4 (3) OOP comprehensibility
5/5 Threads / 1.2 thread deprecation
5 Exceptions, error handling
5 (8) Packages
5 AWT 1.0 event model
4 (no GBL, Box) Layout managers
4 AWT 1.1 event model
2 Basic Swing widgets
2 Advanced Swing widgets
4 1.1 I/O
1 java.math - BigInteger, BigDecimal
5* inner classes
0 JDK 1.2 security
4 1.1 clipboard handling
4 Java Beans
5* RTTI, Reflection, Class
5 CORBA et al (DCOM etc)
5* Comparing Java to C++
5*/0/0 Object serialization / versioning / object file format
4/0 Applets / conversion to applications and vice versa
5/5 Describing / Using naming break/continue is very cool; so is the "Ulcer addicts really like C a of the books reviewed in this article discusses packages as they should be discussed - that is, the relationship between the packages and the file system is introduced at a very late stage, if ever. All books miss crucial information of actually compiling classes that belong to a specific package. This is why there is no clear winner in this subject - this is a bit annoying, as, for a beginner, it's one of the most complicated questions to understand how the packages are located in the file system and what CLASSPATH is. Unfortunately, this subject is only introduced by Sun's own SL-276 revision B course book, the book that discusses mapping of packages, object locks, synchronization, wait/notify and 1.2 thread deprecation (suspend/resume/stop) the best. Core Java is the only to mention some practical info (the compiler doesn't automatically place .class files of a given package to the subdirectories in the current dir). It doesn't show the user how the -d parameter should be used of javac to avoid manually copying the compiled .class files. All books that have been reviewed lack this, extremely important, explanation (except for Sun's far as Swing widgets are concerned. The only exception is Core Java. This book doesn't cover many widgets (only the basic ones), but is very thorough. Let's hope vol2 will cover all the missing widgets.
There is no clear winner. Core Java, Just Java and Thinking in Java are all great for a beginner. Core Java is more of a reference, so you are not guaranteed to understand OOP from that book - a reason for getting Just Java as well. Just Java, on the other hand, is a bit superficial and terse - a reason for getting the other two books. Also, as can be seen from the table, these books are strong sometimes in entirely different areas. Just Java's strength lies in its comprehensibility, while it's not suited for the experienced. Core Java is much harder for a beginner to understand, but is a great reference. Thinking in Java excels at some areas, while there are certain subjects that the books just suck at. You indeed should get the book, but don't expect to become a Swing programmer after reading it. The same stands for the emphasis on the 1.0 event model - most AWT components are presented using the 1.0 event model. It's indeed a bad move from Eckel. Nobody wants to learn / code the old event model any more.
Rather than trying to say which is the one perfect Java book, I recommend that readers look at the strengths and weaknesses of each, and choose from any of the 3 excellent books according to their needs. For example anyone that hate the JDK 1.0 events knows to avoid the Thinking in Java book, but they might buy it for its great coverage of Collections.
There are clear losers. IDG's Java 1.2 Bible and Steyer's Java 1.2 Kompendium are plain bad.
Java 1.2 Bible is just an outdated compendium with a lot of mistakes. The biggest error is that it says we synchronize on a method, so 2 or more threads can't call the same METHOD. The author doesn't seem to understand what he writes about. Furthermore, some information on Java is wrong (e.g. private protected) as they have been removed from the language a long ago (that is, in JDK 1.0.1).
Java 1.2 Kompendium is a real disaster. It's one of the worst books I've ever read on Java. As can be seen from the table above, it doesn't discuss the 1.1 I/O classes. It introduces the AWT widgets using the 1.0 event model - this is also a big problem in Thinking in Java. There are NO practical examples of using the new event model. And the list continues - the author just collected some outdated information on Java 1.0 and tried to re-sell it by including some new info on the capabilities of the newer Java versions. This info is practically useless. The cover has the buzzwords RMI, JavaBeans etc... on it - too bad only 2-3 pages are devoted to these subjects (if any). If you happen to know German, do NOT buy anything from Ralph Steyer before thoroughly scrutinizing it!
Leader of Sun Microsystems Hungary's Java courses
I am a C/C++ programmer who has benefited greatly from Eckel's other big book, Thinking in C++. I have been sufficiently impressed with that book that I thought his Java book would be just as excellent.
The first portion of this book (after the obligatory stuffing at the beginning) is a brief primer on OO concepts. I found this section to be helpful because I already understand the fundamental elements of OOP, and I was looking to clarify what I already know. There were a precious few examples to help make his points, and that's all good, but there needs to be more. There were several keywords thrown about, with no prior mention (and, in some cases, statements like "You'll learn more about this in later chapters"). In a few cases, pulling them together into a program is left as an exercise, and the solutions are not included with the book. For someone with a foundation already, it is sufficient, but for someone with less knowledge it will leave the reader frustrated. Also, this is not intended to be a complete study on OOP, and the reader, beginner or advanced, should keep this in mind.
Just as in his other book, the author goes into great depth to the point of being wordy about different topics. He explains in detail the particulars of the topic he is trying to explain, and he gives examples that focus on the topic at hand and tend to avoid fluff. This is, in my opinion, the strongest aspect of this book.
Another point about this book that pleases me is that, unlike most other tomes on Java, Eckel avoided hitting graphical programming until MUCH later in the book. This is excellent, in my opinion, in that muddying in the waters with graphics, message passing, etc. only adds confusion -- cover the absolute basics first, *then* get to the "cool" topics like graphics.
As he explains the Java language, Eckel often explains why certain language aspects are present, and the decisions that led up to their implementation. So, the reader not only knows what, but why. This will benefit many (myself included), but some people - especially those in a hurry to get about the business of learning the language particulars with no regard for why - might be frustrated by the wordiness.
One thing that can be very annoying is that the author constantly refers back to C and C++. For those who know either of those languages (particularly C++), this is a good point of reference. For those who don't, it can be a sore spot. The book does include an electronic copy of Thinking in C on the CD, but chances are high that the reader bought this book to learn Java, not C. Most Java books teach Java as a standalone language -- this one relies a bit heavily on C++ as a point of reference.
Overall, this is a good book, but not perfect. Those readers who already know C++ in particular will reap the biggest harvest from this book, but everyone can benefit from this book.
on September 24, 2002
This is overrated by some reviewers.
First of all, this book will suit a C++ programmer most. The writer expects the reader to have some programming experience, so you need some programming experience to read and comprehend the book. If you are a C++ programmer trying to get a taste of Java, this book must be in your shelf. Most chapters of the book are excellent, but some are very dull.
The book covers the basics of the language very very well. Whenever I had some query about the basics, I opened the book, and on almost every occasion,I found the answer.
The chapters on GUI are dull, those should have had figures so the reader could get the picture of what the GUI would be like for the respective code. The book should have had more figures.
... This books is based on Java 2 version 1.3 RC 1. A new edition, third edition, of the book is about to hit the shelves.
on May 29, 2002
As a C++ programmer I realy liked this book. It has a lot of emphasis on OOP and is consistent and thorough with regard to Java's OO features, describing their benefit and implementation.
It also briefly touches on subjects such as program analysis and design, UML and extreme programming which gives the programmer an appreciation of these topics and of the whole development life cycle.
In addition, chapters that discuss the API's for I/O, GUI's, Threading and Distributed Computing are really helpful in emphasising what's important and available to the Java programmer.
I also like the pace of this book which is mainly due to how it is broken down.
My only gripe is that a lot of the code examples are pretty much useless from a practical point of view. Although they may demonstrate a particular feature, the fact that they are so improbably contrived and do not demonstrate any practical benefit to a problem in the real world reduces their impact. Case in point: Chapter 8 on Inner Classes, some of the examples here are pretty dumb in what they do. Also, is anyone else sick of Fruit and Shape themes when OO is described? Okay they are useful themes for demonstrating concept but, hey, give us some Meat too please.
on May 23, 2001
If you had graduated from school recently, and would like to take a career in Java, this is the book that will appeal to you the most. Why am I talking about the propensity of this book for new grads? Simple. It has a text-book approach throughout. However, the author takes enough pains to go out of the way to lay strong emphasis on the basics. Sometimes the details are so overwhelming, that you would tend to think as though you are being led astray. But, I bet you that such hard taming of the subject will surely make you a Java Guru.
In Tamil language, they say, "A modicum of rice, would prove the worth of an entire feast". To prove the indispensability of the book, please go through Chapter 4 - Initialization & Cleanup. If I had paid the money to get this book, I am satisfied for just this one simple chapter. I can boldly talk about Object initialization now. I used to tease some of my friends who had been in the Java field for years working in EJB and other cool stuff.But when I throw a simple question on Java Objects initialization, they fall apart. This is not strange. This is not unusual. Because, any book in the market tends to shrug off such topics as of little importance. However this book has lots of basics covered with fine detail, that would only be very appealing to a majority of developers out there.
On the cons side, some examples are just mere verbose kind of stuff, running into pages. That is kind of sickening ad nauseam. There is practically no continuity in the examples, unlike some related examples in Core Java book.
Overall a very good book for a building a robust fundamental base in Java.