Authors: Paul J. Deitel, Harvey M. Deitel
Publisher: Prentice Hall PTR
Reviewed by: Campbell Ritchie
Rating: 8 horseshoes
This book follows the winning formula which all Deitel books use; some people (myself included) like the Deitel style and others don't. Nil desperandum: you can probably find sample chapters at www.Deitel.com. Like all Deitel books, it is large and provides lots of pages for your $!
I enjoyed reading it. The book follows the same pattern as its "How to Program" stable-mate, but lacks some of the beginner's material, so it is quicker to read. Unfortunately the exercises at the ends of chapters, and some of the larger code examples (e.g. the messenger) have gone too.
It is very clear to read, covering all the basics, and introductions to Swing, regular expressions, generics, and threading. Threading can only be handled briefly in a general book and those wanting more detail should look for Brian Goetz's book. Similarly a full handling of websites or databases would require another book.
Exception handling is well covered, but I would have preferred to see more about preconditions and postconditions, and how to maintain a class invariate.
The book has been updated to Java 6 and includes SwingWorker and the Desktop interface. There are also chapters about interfacing with networks, databases (MySQL rather than Derby) Ajax, Java server Faces and Web services.
Those who like a traditional pedagogic introduction to a wide range of Java work, and who like the style, will find this book a great asset; raw beginners might prefer the "How To" book.
Java for Programmers 2nd Edition claims to be a book for the professional programmer. I find this odd since the first 300 pages (out of 1168) are about how to program in Java. If the target group is professionals then remove that bit or if it also includes people that are new to Java or programming in general then 300 pages isn't nearly enough.
The book covers the following topics: Java APIs, Object-Oriented Programming, Database, SQL, JDBC, JavaDB/Apache Derby/MySQL, Networking, JavaServer Faces 2.0, AJAX-Enabled Web Application, Web Services, Generics, Collections, Files, Exception Handling, Multithreading, Swing Graphical User Interfaces, Graphics/Java 2D, Multimedia, OOD/UML ATM Case Study, Debugger and an online introduction to Android App Development. When I saw this list I was quite surprised. For almost each of these topics you can pick up a book of the same size. I was skeptic about how they managed to fit all that information in there.
The main reason I decided to review this book was that it also claimed to cover Java SE 7.Unfortunately these claims have not been totally fulfilled. There is nothing about NIO 2.0 (file-handling), the fork-join framework and binary integral literals and underscores in numeric literals.
The book feels like a big collection of enhanced tutorials. The chapters allow you to write an example program but if you deviate only slightly you'll need to look up materials only as it isn't in the book. The authors decided to use Netbeans as tool to generate code and directory structures. I don't use Netbeans so that was quite annoying. Using Maven it would have been possible to generate code and support for your favorite IDE.
Some of the code examples in this book are just wrong. Improper closing of resources, excessive usage of System.out.printf(), usage of System.exit(1) in exception blocks and no seperation between Model, View & Controller for example.
This book tries to cover to much and therefore fails to properly cover the topics. The quality of the chapters isn't great. If you want to know little about a lot of topics then this is a great book, otherwise google for an tutorial about your topic of choice or pick up a book specific for that topic.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch.