Vous voulez voir cette page en français ? Cliquez ici.

Sign in to turn on 1-Click ordering.
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Thinking in Java (4th Edition) [Paperback]

Bruce Eckel
2.0 out of 5 stars  See all reviews (2 customer reviews)
List Price: CDN$ 85.99
Price: CDN$ 45.76 & FREE Shipping. Details
You Save: CDN$ 40.23 (47%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 5 left in stock (more on the way).
Ships from and sold by Amazon.ca. Gift-wrap available.
Want it delivered Friday, August 29? Choose One-Day Shipping at checkout.
Save Up to 90% on Textbooks
Hit the books in Amazon.ca's Textbook Store and save up to 90% on used textbooks and 35% on new textbooks. Learn more.
Join Amazon Student in Canada

Book Description

Feb. 10 2006 0131872486 978-0131872486 4

Thinking in Java should be read cover to cover by every Java programmer, then kept close at hand for frequent reference. The exercises are challenging, and the chapter on Collections is superb! Not only did this book help me to pass the Sun Certified Java Programmer exam; it’s also the first book I turn to whenever I have a Java question.”
—Jim Pleger, Loudoun County (Virginia) Government
Much better than any other Java book I’ve seen. Make that ‘by an order of magnitude’.... Very complete, with excellent right-to-the-point examples and intelligent, not dumbed-down, explanations.... In contrast to many other Java books I found it to be unusually mature, consistent, intellectually honest, well-written, and precise. IMHO, an ideal book for studying Java.”
—Anatoly Vorobey, Technion University, Haifa, Israel
“Absolutely one of the best programming tutorials I’ve seen for any language.”
—Joakim Ziegler, FIX sysop
“Thank you again for your awesome book. I was really floundering (being a non-C programmer), but your book has brought me up to speed as fast as I could read it. It’s really cool to be able to understand the underlying principles and concepts from the start, rather than having to try to build that conceptual model through trial and error. Hopefully I will be able to attend your seminar in the not-too-distant future.”
—Randall R. Hawley, automation technician, Eli Lilly & Co.
“This is one of the best books I’ve read about a programming language.... The best book ever written on Java.”
—Ravindra Pai, Oracle Corporation, SUNOS product line
“Bruce, your book is wonderful! Your explanations are clear and direct. Through your fantastic book I have gained a tremendous amount of Java knowledge. The exercises are also fantastic and do an excellent job reinforcing the ideas explained throughout the chapters. I look forward to reading more books written by you. Thank you for the tremendous service that you are providing by writing such great books. My code will be much better after reading Thinking in Java. I thank you and I’m sure any programmers who will have to maintain my code are also grateful to you.”
—Yvonne Watkins, Java artisan, Discover Technologies, Inc.
“Other books cover the what of Java (describing the syntax and the libraries) or the how of Java (practical programming examples). Thinking in Java is the only book I know that explains the why of Java: Why it was designed the way it was, why it works the way it does, why it sometimes doesn’t work, why it’s better than C++, why it’s not. Although it also does a good job of teaching the what and how of the language, Thinking in Java is definitely the thinking person’s choice in a Java book.”
—Robert S. Stephenson
Awards for Thinking in Java
2003 Software Development Magazine Jolt Award for Best Book
2003 Java Developer’s Journal Reader’s Choice Award for Best Book
2001 JavaWorld Editor’s Choice Award for Best Book
2000 JavaWorld Reader’s Choice Award for Best Book
1999 Software Development Magazine Productivity Award
1998 Java Developer’s Journal Editor’s Choice Award for Best Book

Thinking in Java has earned raves from programmers worldwide for its extraordinary clarity, careful organization, and small, direct programming examples. From the fundamentals of Java syntax to its most advanced features, Thinking in Java is designed to teach, one simple step at a time.

  • The classic object-oriented introduction for beginners and experts alike, fully updated for Java SE5/6 with many new examples and chapters!
  • Test framework shows program output.
  • Design patterns are shown with multiple examples throughout: Adapter, Bridge, Chain of Responsibility, Command, Decorator, Facade, Factory Method, Flyweight, Iterator, Data Transfer Object, Null Object, Proxy, Singleton, State, Strategy, Template Method, and Visitor.
  • Introduction to XML for data transfer; SWT, Flash for user interfaces.
  • Completely rewritten concurrency chapter gives you a solid grasp of threading fundamentals.
  • 500+ working Java programs in 700+ compiling files, rewritten for this edition and Java SE5/6.
  • Companion web site includes all source code, annotated solution guide, weblog, and multimedia seminars.
  • Thorough coverage of fundamentals; demonstrates advanced topics.
  • Explains sound object-oriented principles.
  • Hands-On Java Seminar CD available online, with full multimedia seminar by Bruce Eckel.
  • Live seminars, consulting, and reviews available. See www.MindView.net

Download seven free sample chapters from Thinking in Java, Fourth Edition. Visit http://mindview.net/Books/TIJ4.

Special Offers and Product Promotions

  • Join Amazon Student in Canada

Frequently Bought Together

Thinking in Java (4th Edition) + Head First Java + Effective Java (2nd Edition)
Price For All Three: CDN$ 119.03

Customers Who Bought This Item Also Bought

Product Details

Product Description

About the Author

Bruce Eckel is president of MindView, Inc. (www.MindView.net), which provides public and private training seminars, consulting, mentoring, and design reviews in object-oriented technology and design patterns. He is the author of several books, has written more than fifty articles, and has given lectures and seminars throughout the world for more than twenty years. Bruce has served as a voting member of the C++ Standards Committee. He holds a B.S. in applied physics and an M.S. in computer engineering.

Excerpt. © Reprinted by permission. All rights reserved.

I originally approached Java as “just another programming language,” which in many senses it is.

But as time passed and I studied it more deeply, I began to see that the fundamental intent of this language was different from other languages I had seen up to that point.

Programming is about managing complexity: the complexity of the problem you want to solve, laid upon the complexity of the machine in which it is solved. Because of this complexity, most of our programming projects fail. And yet, of all the programming languages of which I am aware, almost none have gone all out and decided that their main design goal would be to conquer the complexity of developing and maintaining programs. 1 Of course, many language design decisions were made with complexity in mind, but at some point there were always other issues that were considered essential to be added into the mix. Inevitably, those other issues are what cause programmers to eventually “hit the wall” with that language. For example, C++ had to be backwards-compatible with C (to allow easy migration for C programmers), as well as efficient. Those are both very useful goals and account for much of the success of C++, but they also expose extra complexity that prevents some projects from being finished (certainly, you can blame programmers and management, but if a language can help by catching your mistakes, why shouldn’t it?). As another example, Visual BASIC (VB) was tied to BASIC, which wasn’t really designed to be an extensible language, so all the extensions piled upon VB have produced some truly unmaintainable syntax. Perl is backwards-compatible with awk, sed, grep, and other Unix tools it was meant to replace, and as a result it is often accused of producing “write-only code” (that is, after a while you can’t read it). On the other hand, C++, VB, Perl, and other languages like Smalltalk had some of their design efforts focused on the issue of complexity and as a result are remarkably successful in solving certain types of problems.

What has impressed me most as I have come to understand Java is that somewhere in the mix of Sun’s design objectives, it seems that there was a goal of reducing complexity for the programmer. As if to say, “We care about reducing the time and difficulty of producing robust code.” In the early days, this goal resulted in code that didn’t run very fast (although this has improved over time), but it has indeed produced amazing reductions in development time—half or less of the time that it takes to create an equivalent C++ program. This result alone can save incredible amounts of time and money, but Java doesn’t stop there. It goes on to wrap many of the complex tasks that have become important, such as multithreading and network programming, in language features or libraries that can at times make those tasks easy. And finally, it tackles some really big complexity problems: cross-platform programs, dynamic code changes, and even security, each of which can fit on your complexity spectrum anywhere from “impediment” to “show-stopper.” So despite the performance problems that we’ve seen, the promise of Java is tremendous: It can make us significantly more productive programmers.

In all ways—creating the programs, working in teams, building user interfaces to communicate with the user, running the programs on different types of machines, and easily writing programs that communicate across the Internet—Java increases the communication bandwidth between people.

I think that the results of the communication revolution may not be seen from the effects of moving large quantities of bits around. We shall see the true revolution because we will all communicate with each other more easily: one-on-one, 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.

Java SE5 and SE6

This edition of the book benefits greatly from the improvements made to the Java language in what Sun originally called JDK 1.5, and then later changed to JDK5 or J2SE5, then finally they dropped the outdated “2” and changed it to Java SE5. Many of the Java SE5 language changes were designed to improve the experience of the programmer. As you shall see, the Java language designers did not completely succeed at this task, but in general they made large steps in the right direction.

One of the important goals of this edition is to completely absorb the improvements of Java SE5/6, and to introduce and use them throughout this book. This means that this edition takes the somewhat bold step of being “Java SE5/6-only,” and much of the code in the book will not compile with earlier versions of Java; the build system will complain and stop if you try. However, I think the benefits are worth the risk.

If you are somehow fettered to earlier versions of Java, I have covered the bases by providing free downloads of previous editions of this book via www.MindView.net. For various reasons, I have decided not to provide the current edition of the book in free electronic form, but only the prior editions.

Java SE6

This book was a monumental, time-consuming project, and before it was published, Java SE6 (code-named mustang) appeared in beta form. Although there were a few minor changes in Java SE6 that improved some of the examples in the book, for the most part the focus of Java SE6 did not affect the content of this book; the features were primarily speed improvements and library features that were outside the purview of this text.

The code in this book was successfully tested with a release candidate of Java SE6, so I do not expect any changes that will affect the content of this book. If there are any important changes by the time Java SE6 is officially released, these will be reflected in the book’s source code, which is downloadable from www.MindView.net.

The cover indicates that this book is for “Java SE5/6,” which means “written for Java SE5 and the very significant changes that version introduced into the language, but is equally applicable to Java SE6.”

The 4th edition

The satisfaction of doing a new edition of a book is in getting things “right,” according to what I have learned since the last edition came out. Often these insights are in the nature of the saying “A learning experience is what you get when you don’t get what you want,” and my opportunity is to fix something embarrassing or simply tedious. Just as often, creating the next edition produces fascinating new ideas, and the embarrassment is far outweighed by the delight of discovery and the ability to express ideas in a better form than what I have previously achieved.

There is also the challenge that whispers in the back of my brain, that of making the book something that owners of previous editions will want to buy. This presses me to improve, rewrite and reorganize everything that I can, to make the book a new and valuable experience for dedicated readers.


The CD-ROM that has traditionally been packaged as part of this book is not part of this edition. The essential part of that CD, the Thinking in C multimedia seminar (created for MindView by Chuck Allison), is now available as a downloadable Flash presentation. The goal of that seminar is to prepare those who are not familiar enough with C syntax to understand the material presented in this book. Although two of the chapters in this book give decent introductory syntax coverage, they may not be enough for people without an adequate background, and Thinking in C is intended to help those people get to the necessary level.

The Concurrency chapter (formerly called “Multithreading”) has been completely rewritten to match the major changes in the Java SE5 concurrency libraries, but it still gives you a basic foundation in the core ideas of concurrency. Without that core, it’s hard to understand more complex issues of threading. I spent many months working on this, immersed in that netherworld called “concurrency,” and in the end the chapter is something that not only provides a basic foundation but also ventures into more advanced territory.

There is a new chapter on every significant new Java SE5 language feature, and the other new features have been woven into modifications made to the existing material. Because of my continuing study of design patterns, more patterns have been introduced throughout the book as well.

The book has undergone significant reorganization. Much of this has come from the teaching process together with a realization that, perhaps, my perception of what a “chapter” was could stand some rethought. I have tended towards an unconsidered belief that a topic had to be “big enough” to justify being a chapter. But especially while teaching design patterns, I find that seminar attendees do best if I introduce a single pattern and then we immediately do an exercise, even if it means I only speak for a brief time (I discovered that this pace was also more enjoyable for me as a teacher). So in this version of the book I’ve tried to break chapters up by topic, and not worry about the resulting length of the chapters. I think it has been an improvement.

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, I created a test framework to display and validate the output of each program. (The framework was written in Python; you can find it in the downloadable code for this book at www.MindView.net.) Testing in general is covered in the supplement you will find at http://MindView.net/Books/BetterJava, which introduces what I now believe are fundamental skills that all 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). Many of the existing examples have had very significant redesign and reimplementation. Examples that no longer made sense to me were removed, and new examples have been added.

Readers have made many, many wonderful comments about the first three 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 have attempted to do in this edition is trim out the portions that have become obsolete, or at least nonessential. In general, I’ve tried to go over everything, remove what is no longer necessary, include changes, and improve everything I could. I feel comfortable removing portions because the original material remains on the Web site (www.MindView.net), in the form of the freely downloadable 1st through 3rd editions of the book, and in the downloadable supplements for this book. For those of you who still can’t stand the size of the book, I do apologize. Believe it or not, I have worked hard to keep the size down.

Note on the cover design

The cover of Thinking in Java is inspired by the American Arts & Crafts Movement that began near the turn of the century and reached its zenith between 1900 and 1920. It began in England as a reaction to both the machine production of the Industrial Revolution and the highly ornamental style of the Victorian era. Arts & Crafts emphasized spare design, the forms of nature as seen in the art nouveau movement, hand-crafting, and the importance of the individual craftsperson, and yet it did not eschew the use of modern tools. There are many echoes with the situation we have today: the turn of the century, the evolution from the raw beginnings of the computer revolution to something more refined and meaningful, and the emphasis on software craftsmanship rather than just manufacturing code.

I see Java in this same way: as an attempt to elevate the programmer away from an operating system mechanic and toward being a “software craftsman.”

Both the author and the book/cover designer (who have been friends since childhood) find inspiration in this movement, and both own furniture, lamps, and other pieces that are either original or inspired by this period.

The other theme in this cover suggests a collection box that a naturalist might use to display the insect specimens that he or she has preserved. These insects are objects that are placed within the box objects. The box objects are themselves placed within the “cover object,” which illustrates the fundamental concept of aggregation in object-oriented programming. Of course, a programmer cannot help but make the association with “bugs,” and here the bugs have been captured and presumably killed in a specimen jar, and finally confined within a small display box, as if to imply Java’s ability to find, display, and subdue bugs (which is truly one of its most powerful attributes).

In this edition, I created the watercolor painting that you see as the cover background.


First, thanks to associates who have worked with me to give seminars, provide consulting, and develop teaching projects: Dave Bartlett, Bill Venners, Chuck Allison, Jeremy Meyer, and Jamie King. I appreciate your patience as I continue to try to develop the best model for independent folks like us to work together.

Recently, no doubt because of the Internet, I have become associated with a surprisingly large number of people who assist me in my endeavors, usually working from their own home offices. In the past, I would have had to pay for a pretty big office space to accommodate all these folks, but because of the Net, FedEx, and the telephone, I’m able to benefit from their help without the extra costs. In my attempts to learn to “play well with others,” you have all been very helpful, and I hope to continue learning how to make my own work better through the efforts of others. Paula Steuer has been invaluable in taking over my haphazard business practices and making them sane (thanks for prodding me when I don’t want to do something, Paula). Jonathan Wilcox, Esq., has sifted through my corporate structure and turned over every possible rock that might hide scorpions, and frog-marched us through the process of putting everything straight, legally. Thanks for your care and persistence. Sharlynn Cobaugh has made herself an expert in sound processing and an essential part of creating the multimedia training experiences, as well as tackling other problems. Thanks for your perseverance when faced with intractable computer problems. The folks at Amaio in Prague have helped me out with several projects. Daniel Will-Harris was the original work-by-Internet inspiration, and he is of course fundamental to all my graphic design solutions.

Over the years, through his conferences and workshops, Gerald Weinberg has become my unofficial coach and mentor, for which I thank him.

Ervin Varga was exceptionally helpful with technical corrections on the 4th edition—although other people helped on various chapters and examples, Ervin was my primary technical reviewer for the book, and he also took on the task of rewriting the solution guide for the 4th edition. Ervin found errors and made improvements to the book that were invaluable additions to this text. His thoroughness and attention to detail are amazing, and he’s far and away the best technical reader I’ve ever had. Thanks, Ervin.

My weblog on Bill Venners’ www.Artima.com has been a source of assistance when I’ve needed to bounce ideas around. Thanks to the readers that have helped me clarify concepts by submitting comments, including James Watson, Howard Lovatt, Michael Barker, and others, in particular those who helped with generics.

Thanks to Mark Welsh for his continuing assistance.

Evan Cofsky continues to be very supportive by knowing off the top of his head all the arcane details of setting up and maintaining Linux-based Web servers, and keeping the MindView server tuned and secure.

A special thanks to my new friend, coffee, who generated nearly boundless enthusiasm for this project. Camp4 Coffee in Crested Butte, Colorado, has become the standard hangout when people have come up to take MindView seminars, and during seminar breaks it is the best catering I’ve ever had. Thanks to my buddy Al Smith for creating it and making it such a great place, and for being such an interesting and entertaining part of the Crested Butte experience. And to all the Camp4 barristas who so cheerfully dole out beverages.

Thanks to the folks at Prentice Hall for continuing to give me what I want, putting up with all my special requirements, and for going out of their way to make things run smoothly for me.

Certain tools have proved invaluable during my development process and I am very grateful to the creators every time I use these. Cygwin (www.cygwin.com) has solved innumerable problems for me that Windows can’t/won’t and I become more attached to it each day (if I only had this 15 years ago when my brain was still hard-wired with Gnu Emacs). IBM’s Eclipse (www.eclipse.org) is a truly wonderful contribution to the development community, and I expect to see great things from it as it continues to evolve (how did IBM become hip? I must have missed a memo). JetBrains IntelliJ Idea continues to forge creative new paths in development tools.

I began using Enterprise Architect from Sparxsystems on this book, and it has rapidly become my UML tool of choice. Marco Hunsicker’s Jalopy code formatter (www.triemax.com) came in handy on numerous occasions, and Marco was very helpful in configuring it to my particular needs. I’ve also found Slava Pestov’s JEdit and plug-ins to be helpful at times (www.jedit.org) and it’s quite a reasonable beginner’s editor for seminars.

And of course, if I don’t say it enough everywhere else, I use Python (www.Python.org) constantly to solve problems, the brainchild of my buddy Guido Van Rossum and the gang of goofy geniuses with whom I spent a few great days sprinting (Tim Peters, I’ve now framed that mouse you borrowed, officially named the “TimBotMouse”). You guys need to find healthier places to eat lunch. (Also, thanks to the entire Python community, an amazing bunch of people.)

Lots of people sent in corrections and I am indebted to them all, but particular thanks go to (for the 1st edition): Kevin Raulerson (found tons of great bugs), Bob Resendes (simply incredible), John Pinto, Joe Dante, Joe Sharp (all three were fabulous), David Combs (many grammar and clarification corrections), Dr. Robert Stephenson, John Cook, Franklin Chen, Zev Griner, David Karr, Leander A. Stroschein, Steve Clark, Charles A. Lee, Austin Maher, Dennis P. Roth, Roque Oliveira, Douglas Dunn, Dejan Ristic, Neil Galarneau, David B. Malkovsky, Steve Wilkinson, and a host of others. Prof. Ir. Marc Meurrens put in a great deal of effort to publicize and make the electronic version of the 1st edition of the book available in Europe.

Thanks to those who helped me rewrite the examples to use the Swing library (for the 2nd edition), and for other assistance: Jon Shvarts, Thomas Kirsch, Rahim Adatia, Rajesh Jain, Ravi Manthena, Banu Rajamani, Jens Brandt, Nitin Shivaram, Malcolm Davis, and everyone who expressed support.

In the 4th edition, Chris Grindstaff was very helpful during the development of the SWT section, and Sean Neville wrote the first draft of the Flex section for me.

Kraig Brockschmidt and Gen Kiyooka have been some of the smart technical people in my life who have become friends and have also been both influential and unusual in that they do yoga and practice other forms of spiritual enhancement, which I find quite inspirational and instructional.

It’s not that much of a surprise to me that understanding Delphi helped me understand Java, since there are many concepts and language design decisions in common. My Delphi friends provided assistance by helping me gain insight into that marvelous programming environment. They are Marco Cantu (another Italian—perhaps being steeped in Latin gives one aptitude for programming languages?), Neil Rubenking (who used to do the yoga/vegetarian/Zen thing until he discovered computers), and of course Zack Urlocker (the original Delphi product manager), a long-time pal whom I’ve traveled the world with. We’re all indebted to the brilliance of Anders Hejlsberg, who continues to toil away at C# (which, as you’ll learn in this book, was a major inspiration for Java SE5).

My friend Richard Hale Shaw’s insights and support have been very helpful (and Kim’s, too). Richard and I spent many months giving seminars together and trying to work out the perfect learning experience for the attendees.

The book design, cover design, and cover photo were created by my friend Daniel Will-Harris, noted author and designer (www.Will-Harris.com), who used to play with rub-on letters in junior high school while he awaited the invention of computers and desktop publishing, and complained of me mumbling over my algebra problems. However, I produced the camera-ready pages myself, so the typesetting errors are mine. Microsoft ® Word XP for Windows was used to write the book and to create camera-ready pages in Adobe Acrobat; the book was created directly from the Acrobat PDF files. As a tribute to the electronic age, I happened to be overseas when I produced the final versions of the 1st and 2nd editions of the book—the 1st edition was sent from Cape Town, South Africa, and the 2nd edition was posted from Prague. The 3rd and 4th came from Crested Butte, Colorado. The body typeface is Georgia and the headlines are in Verdana. The cover typeface is ITC Rennie Mackintosh.

A special thanks to all my teachers and all my students (who are my teachers as well).

Molly the cat often sat in my lap while I worked on this edition, and thus offered her own kind of warm, furry support.

The supporting cast of friends includes, but is not limited to: Patty Gast (Masseuse extraordinaire), Andrew Binstock, Steve Sinofsky, JD Hildebrandt, Tom Keffer, Brian McElhinney, Brinkley Barr, Bill Gates at Midnight Engineering Magazine, Larry Constantine and Lucy Lockwood, Gene Wang, Dave Mayer, David Intersimone, Chris and Laura Strand, the Almquists, Brad Jerbic, Marilyn Cvitanic, Mark Mabry, the Robbins families, the Moelter families (and the McMillans), Michael Wilk, Dave Stoner, the Cranstons, Larry Fogg, Mike Sequeira, Gary Entsminger, Kevin and Sonda Donovan, Joe Lordi, Dave and Brenda Bartlett, Patti Gast, Blake, Annette & Jade, the Rentschlers, the Sudeks, Dick, Patty, and Lee Eckel, Lynn and Todd, and their families. And of course, Mom and Dad.


1. However, I believe that the Python language comes closest to doing exactly that. See www.Python.org.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5 star
4 star
2 star
2.0 out of 5 stars
2.0 out of 5 stars
Most helpful customer reviews
3.0 out of 5 stars Good book/Greedy author May 24 2014
By T
A great book to read, probably one of the bests on Java. True, the author wants you to purchase the solutions but there are user posted solutions on the internet you can find with a click of a button! I don't understand how such an author can justify making a fabulous book but having the user pay for the exercises, I really hope no one falls for this.
Was this review helpful to you?
3 of 7 people found the following review helpful
1.0 out of 5 stars The authors thinks we're all rich Aug. 18 2010
By Mereo
One of the worst book I've read.

Yes, it explains Java as if it's a university course. But what I HATE about it is the fact you need to BUY the exercises SOLUTIONS!

I mean come on! I already brought the book for $55 and you want me to buy the solutions that should be FREE in order to LEARN?!

My suggestion? run AWAY from this book, it's not worth it.
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.1 out of 5 stars  74 reviews
21 of 23 people found the following review helpful
5.0 out of 5 stars If you are serious about learning Object Orientated Programming, then this is the book for you. Jan. 9 2007
By J. Nadir - Published on Amazon.com
Format:Paperback|Verified Purchase
This is not a beginner's book to programming, but if you have a little bit of programming experience and the desire to learn, this is the book for you. Thinking in Java helps you understand the thought process and concepts that the developers of Java had in mind when they developed the language. Bruce Eckel is a very experienced teacher and excellent communicator who is able to present the concepts in an understandable way. This is not for bedtime reading, you should have Java installed on your machine and interact with the book. Of course, nothing is better than attending a seminar by Mr. Eckel but this book comes pretty darn close. Don't bother with the "free" versions of this book's earlier editions, the Java Language has evolved and moved beyond them (Java added "generics" which is a major and painful language after-thought). It is clear that Mr. Eckel is not a fan of the way that Sun implemented Java (and I agree with him). But if you limit the use of Generics you can get by. If you are relatively new to programming and have the desire to learn, you should expect to spend at least three months crawling through this treasure book. It will be worth the effort. If you are an experienced programmer, this book will reveal the underlying concepts in a meaningful way to help you understand the differences between Java and C# and you can get through it in about a month. In addition, this book tries to show you how to organize your code for human readability (when properly done, your code almost reads like a human language - and please remember, I said "almost"). As a final comment, Java is a complex and verbose language (especially since Sun added generics) so this book will always be a good reference.
50 of 60 people found the following review helpful
2.0 out of 5 stars Seems specifically designed to confuse beginners. Sept. 17 2008
By Grant S. Robertson - Published on Amazon.com
Although this book purports to be written for anyone with even a little bit of prior programming experience, I am finding it very difficult to follow. This, even though I have been dabbling in programming since 1976 and I have gotten 'A's in several programming classes.

The author makes three major mistakes all throughout the book:

First, he uses compressed code formating that makes it difficult to see where one part of the code ends and another starts. I know it is common for advanced programmers and authors trying to save paper to use this format, but it should not be used in a book for beginning Java programmers. I spend more time just trying to sort out which curly bracket matches to which curly bracket than anything else in trying to read his code.

Second, he continuously uses advanced techniques and Java features in sample code meant to illustrate beginning concepts. This leaves the reader confused about what the code is doing at all and forces them to simply take on faith that what the author says about the code is true. For instance, in the section titled "Your first Java Program" (page 78) the author instantiates an anonymous object and passes it to a method. There was no reason to include this line of code. But the author stuck it in there and then waved his hands at it saying merely, "The argument is a Date object that is being created just to send its va1ue (which is automatically converted to a String) to println(). As soon as this statement is finished, that Date is unnecessary, and the garbage collector can come along and get it anytime. We don't need to worry about cleaning it up." In those few sentences the author has made reference to several more advanced features without even explaining them. So, in trying to understand that one unnecessary line of the reader is spun off on at least three different tangents.
The next sample program is even worse. The very first line that actually does anything is " System.getProperties().list(System.out); " Holy cow! The System.getProperties() method returns a Properties object which is an extension of the Hashtable class. Then the second dot operator calls the list method for Properties object that has "replaced" the System.getProperties() part of the code as far as the second dot operator is concerned. The list() method then accepts as an argument a static PrintStream object which the list() method then sends its output to. And the author says merely, "The first line in main( ) displays all of the "properties" from the system where you are running the program, so it gives you environment information. The list() method sends the results to its argument, System.out." But to someone who is only just now reading this page in the book, "System.out" is how you print something, NOT something that can be passed as an argument. And have you ever tried to Google a period (.)? How is a beginner supposed to figure out that the list() method is a member of the Properties object that was returned by the System.getProperties() method. Sure, you can dig it out of the JavaDocs but a beginner won't be able to do this easily. Besides, if you are going to force the reader to dig everything out of the JavaDocs then what the heck is the book good for?
This same pattern is repeated throughout the book. Every single example has something in it that is more advanced than a person who has gotten to that part of the book could reasonably be expected to be able to figure out.

Finally, the biggest problem with this book is that the author has created his own set of libraries and uses them heavily in his code but doesn't indicate where. So, if you don't have the entire JDK memorized you have no clue when he is using something from the standard libraries or something from his own libraries. If you are trying to learn the basics of Java, you don't want to have some other stuff mixed in at random. Sure, the author's libraries may solve some interesting problems and it may make some things easier to code. But it DOES NOT teach the reader about how Java works other than it is possible to completely obfuscate everything you do.

So, my conclusion is that this book is really good for nothing. It is too confusing for the beginner and is way too wordy for an expert. Intermediate users will spend more time digging through the JavaDocs than they do reading the book.
27 of 31 people found the following review helpful
3.0 out of 5 stars Complete coverage, sheer drudgery, not a suitable first tutorial March 15 2006
By Moore Paul Patrick - Published on Amazon.com
[Note: this review refers to the 3rd edition. I haven't had access to the 4th edition to see what has changed.]

The summary says it all. This 1,000+ page monster probably has the best coverage of all the Java books purporting to be considered as introductory texts. In terms of completeness, it is better than the Sierra/Bates and Deitel books. However, these two books are much more approachable, with better layout and presentation, whereas working through this book is sheer drudgery.

The book uses extensive use of long examples to demonstrate the various language concepts and features. This approach IMO is very long-winded, and bumps up the size of the book to its present doorstop size. The coverage of inner and anonymous classes gets bogged down with the excessive use of example listings, while the treatment of the Java I/O System runs to 110 pages, and Collections to 120 pages, more than double that used by Deitel! A better approach IMO, as successfully used by Lippman in his popular C++ Primer, would have been to use small code fragments to demonstrate each point, and then present a more complete, compilable example at the end of each section or chapter. With free time a precious commodity, I want to learn new topics as quickly as possible, and learn the more esoteric details from more specialised sources later.

The presentation of the book could also be improved. As has already been mentioned by other reviewers, there is a dearth of diagrams to break up the monotony of the presentation. For example, Eckel makes occasional reference to design patterns in the text. Why not add UML diagrams to emphasise the point? Also, the coverage of the Java I/O Syetem, with its large collection of interrelated classes, simply cries out for a class diagram.

The book can be used as a very readable language reference. I should mention that Eckel's writing style itself is quite readable; a pity about the dour presentation. The on-line availability of the book is also a boon for searching particular topics.
14 of 16 people found the following review helpful
5.0 out of 5 stars The best. Aug. 14 2006
By Bogus Exception - Published on Amazon.com
I'll make this short. I depend a LOT on buyer reviews on Amazon to help me decide what to get. This book is the best book on Java, taking the reader from the basics right up to the sexy stuff in J2SE5 like queues and generics.

This is the book that my 20+ other Java books are judged against.
10 of 11 people found the following review helpful
4.0 out of 5 stars For Beginners - BAD ! 2-nd time around - GREAT March 18 2006
By Joseph B. Cohen - Published on Amazon.com
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.
Search Customer Reviews
Only search this product's reviews

Look for similar items by category