Thinking in Java 1st Edition
| Bruce Eckel (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
There is a newer edition of this item:
Customers who viewed this item also viewed
Editorial Reviews
Amazon.com Review
Thinking in Java begins a little esoterically, with the author's reflections on why Java is new and better. (This book's choice of font for chapter headings is remarkably hard on the eyes.) The author outlines his thoughts on why Java will make you a better programmer, without all the complexity. The book is better when he presents actual language features. There's a tutorial to basic Java types, keywords, and operators. The guide includes extensive source code that is sometimes daunting (as with the author's sample code for all the Java operators in one listing.) As such, this text will be most useful for the experienced developer.
The text then moves on to class design issues, when to use inheritance and composition, and related topics of information hiding and polymorphism. (The treatment of inner classes and scoping will likely seem a bit overdone for most readers.) The chapter on Java collection classes for both Java Developer's Kit (JDK) 1.1 and the new classes, such as sets, lists, and maps, are much better. There's material in this chapter that you are unlikely to find anywhere else.
Chapters on exception handling and programming with type information are also worthwhile, as are the chapters on the new Swing interface classes and network programming. Although it adopts somewhat of a mixed-bag approach, Thinking in Java contains some excellent material for the object-oriented developer who wants to see what all the fuss is about with Java.
From the Back Cover
The definitive introduction to object-oriented programming in the language of the World Wide Web.
Full text, updates and code at BruceEckel
From the fundamentals of Java syntax to its most advanced features (network programming, advanced object-oriented capabilities, multi-threading), Thinking in Java is designed to teach. Bruce Eckel's readable style and small, direct programming examples make even the most arcane concepts clear.
* For beginners and experts alike.
* Teaches Java linguistics, not platform-dependent mechanics.
* Covers the most important aspects of Java 2: Swing and the new collections.
* Thorough coverage of advanced Java topics: network programming, multithreading, virtual machine performance, and connecting to non-Java code.
* 320 working Java programs, 15,000+ lines of code.
* Explains sound object-oriented principles, from inheritance to design patterns.
* From an independent voice, award-winning author Bruce Eckel.
* Source code and continuously updated, electronic version of the book freely available on the World Wide Web.
* Companion CD (with more than 15 hours of integrated audio lectures) available at BruceEckel
What People Are Saying:
“The best book on Java . . . Your depth is amazing.”
“Definitely the thinking person's choice in a Java book.”
“One of the absolutely best programming tutorials I've seen, for any language.”
Winner of Software Development magazine's Productivity Award at SD 99!
Winner of Java Developer's Journal's Editor's Choice Award!
About the Author
Excerpt. © Reprinted by permission. All rights reserved.
FOREWORD
I suggested to my brother Todd, who is making the leap from hardware into programming, that the next big revolution will be in genetic engineering.
We'll have microbes designed to make food, fuel and plastic; they'll clean up pollution and in general allow us to master the manipulation of the physical world for a fraction of what it costs now. I claimed that it would make the computer revolution look small in comparison.
Then I realized I was making a mistake common to science fiction writers: getting lost in the technology (which is of course easy to do in science fiction). An experienced writer knows that the story is never about the things; it's about the people. Genetics will have a very large impact on our lives, but I'm not so sure it will dwarf the computer revolution - or at least the information revolution. Information is about talking to each other: yes, cars and shoes and especially genetic cures are important, but in the end those are just trappings. What truly matters is how we relate to the world. And so much of that is about communication. This book is a case in point. A majority of folks thought I was very bold or a little crazy to put the entire thing up on the Web. "Why would anyone buy it?" they asked. If I had been of a more conservative nature I wouldn't have done it, but I really didn't want to write another computer book in the same old way. I didn't know what would happen but it turned out to be the smartest thing I've ever done with a book. For one thing, people started sending in corrections. This has been an amazing process, because folks have looked into every nook and cranny and caught both technical and grammatical errors, and I've been able to eliminate bugs of all sorts that I know would have otherwise slipped through. People have been simply terrific about this, very often saying "Now, I don't mean this in a critical way" and then giving me a collection of errors I'm sure I never would have found. I feel like this has been a kind of group process and it has really made the book into something special.
But then I started hearing "OK, fine, it's nice you've put up an electronic version, but I want a printed and bound copy from a real publisher." I tried very hard to make it easy for everyone to print it out in a nice looking format but it didn't stem the demand for the published book. Most people don't want to read the entire book on screen, and hauling around a sheaf of papers, no matter how nicely printed, didn't appeal to them either (plus I think it's not so cheap in terms of laser printer toner). It seems that the computer revolution won't put publishers out of business, after all. However, one student suggested this may become a model for future publishing: books will be published on the Web first, and only if sufficient interest warrants it will the book be put on paper. Currently, the great majority of books of all kinds are financial failures, and perhaps this new approach could make the publishing industry more profitable.
This book became an enlightening experience for me in another way. 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 intention of the language is different than in all the other languages I have seen.
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 that I am aware, none of them have gone all out and decided that their main design goal would be to conquer the complexity of developing and maintaining programs. Of course, many language design decisions were made with complexity in mind, but at some point there were always some other issues that were considered essential to be added into the mix.
Inevitably, those other issues are what causes 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 horrible and un-maintainable syntax. On the other hand, C++, VB 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 what seems like an unflinching goal of reducing complexity for the programmer. As if to say "we don't care about anything except reducing the time and difficulty of producing robust code." In the early days, this goal has resulted in code that doesn't run very fast (although there have been many promises made about how quickly Java will someday run) 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 all 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 trivial. 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 we've seen, the promise of Java is tremendous: it can make us significantly more productive programmers.
One of the places I see the greatest impact for this is on the Web. Network programming has always been hard, and Java makes it easy (and they're working on making it easier all the time). Network programming is how we talk to each other more effectively and cheaply than we ever have with telephones (email alone has revolutionized many businesses). As we talk to each other more, amazing things begin to happen, possibly more amazing even than the promise of genetic engineering.
In all ways: creating the programs, working in teams to create the programs, building user interfaces so the programs can 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. And I think that perhaps the results of the communication revolution will not be seen from the effects of moving large quantities of bits around. We shall see the true revolution because we will all be able to talk to 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 which 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 here by attempting to teach the language.
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.
Product details
- Publisher : Prentice Hall Ptr; 1st edition (March 1, 1998)
- Language : English
- Paperback : 1098 pages
- ISBN-10 : 0136597238
- ISBN-13 : 978-0136597230
- Item Weight : 3.45 pounds
- Dimensions : 7.5 x 1.75 x 9.5 inches
- Best Sellers Rank: #4,457,286 in Books (See Top 100 in Books)
- #2,708 in Java Programming
- #10,795 in Computer Programming Languages
- #20,542 in Computer Software (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I like the idea of cover -- the idea of programming as a kind of craft. Polished wood on the cover looks natural. It's inspired by the "American Art & Crafts Movement" that emphasized the importance of the individual craftsman in the use of modern tools.
The main idea of the book is right -- the programming language should be learned through experimentation with available implementation. Examples are well structured to expose the properties of the language, especially OO features. Such an approach is well suited for teaching. At the same time when examples are designed for experimentation, they fail to reveal typical idioms used in practical programming and this is a drawback of such an approach. To compensate for weaknesses of current examples the author probably can eliminate some water from them and add some examples illustrating idioms and/or provide comments for the examples included with JDK.
TIJ can be considered as one of the first second-generation Java books with a somewhat sober approach to the language. The author does not consider Java as a replacement for C/C++ as it's actually competes with VB and PowerBuilder. The book still contains hype about OO, but on a tolerable level. Some references to design patterns movement have a flavor of proselytizing, but people critical to the patterns movement can easily ignore them. At the same time, the language constructs are explained well, especially OO-related features. Generally the book is focused on high-level staff. JVM and debugging -- the last one is probably the most problematic in adopting Java in large projects (before OO people used to make their own errors; now they tend to inherit them ;-) -- are not discussed at all.
Writing an introductory book on Java is a very tricky ta! sk. With each new release of JDK the inflation of the value of already published books is comparable to the inflation of the ruble after the dissolution of the USSR (i.e. more than 100% a year ;-). There are already more than 500 books on Java, and more than 80% of them are introductory. Judging from this standpoint in just three years Java became the 4-th most important computer language after Basic (more than 3000 books), C/C++ (more than 2000 books) and Pascal/Delphi (more than 900 books). There are more books on Java than on Fortran (less than 500), Cobol (less than 500), Lisp (less than 200) -- the languages with more than two decades of history. Java is extremely fashionable. So buyers beware ;-). I use a simple checklist to determine whether a particular introductory programming language book is worth reading:
1. Is the text of the book available electronically or on the CD?
2. Does the author have a personal web-site with an area devoted to the book (if not he probably does not care much about the book)?
3. Does the book have an updated examples and errata available on the WEB (the examples *always* need updating after publishing ;-)?
4. How practical are the examples and how much of the code can be reused ?
5. Is the Donald Knuth article "Structured programming with GOTO" mentioned in a chapter on control structures and short-circuit AND/OR explained in the "if" statement?.
6. Is visibility rules and storage allocation mechanisms (especially difference between static and dynamic allocation) explained clearly using both examples and diagrams ?
7. What books the author recommends ("the friends of my friends ...") ?
Not many books will pass this test, so the choice became much easier. TIJ passes all, but q.4 (examples are designed for experimentation with the language, not for practical use) and q.6 (no diagrams for storage allocation and visibility).
IMHO this book represents a major innovation in publishing -- I would like to call it a para! llel publishing. Bruce Eckel has found an extremely interesting solution to make his book different despite a Java introductory books glut -- he published the book on the WEB first. This "Try before you buy" approach has a lot of advantages. As he states in the foreword "it turned out to be the smartest thing I've ever done with a book". The book definitely benefited from comments and suggestions of early readers. Several publishers are now trying this approach (see for example McGraw-Hill betabooks site), but to a more limited extent (final copies of the books are never available from the McGraw-Hill site).
The book was typeset by the author in MS Word 97. That approach always makes the book more up-to-date than a traditional typesetting, and it probably contain less typos than other early 1998 books typeset in a traditional way. All examples that I tested worked. In comparison with other books published in the first quarter of 1998, it contains more recent information. For example, a discussion of the JFC (a.k.a. Swing library).
However, such an approach is not without flaws. The main drawback is that the book lacks diagrams that will clarify concepts (probably partially due to monolithic approach -- MS Word 97 is not very good in working with such long documents). Layout is mostly plain vanilla text with a very few fonts. Important thoughts are not reiterated and were not put in a separate font.
Regrettably, like most other books on Java, examples are all typeset at plain Courier with excessive spacing between the lines. It contributed to the volume of the book. ALGOL-style typesetting of examples would be much better.
I recommend this book for readers proficient in at least one procedural language, but who suffer from the inferiority complex and want to learn of all this modern Java/OO staff ASAP;-). The book is definitely useful for teaching the language.
Yes, learning Java is becoming more tedious as the language gets more mature; Java 2 has just added a 'few' classes, but like I always say, you don't learn English by reading one single book; the same analogy applies here. You should read a set of Java books (and keep on reading) to move from one level to the next. That 'set' should include this one.
Thank you,
Besides being long winded it is also tries to be a comprehensive "bible" for Java. The problem is that the sections on swing don't have the depth to tackle real world projects. So you will end up picking up books on specific Java systems anyway.
Java is changing fast and by the time you get through this there will be two new versions out there. Read Java in a Nutshell and you will be ready to go in less than half the time.
Top reviews from other countries
Contains all chapters in details. No need to refer to any other book. This is best. Go for it.



