CHANNELS
HOME
TOP STORIES
COLUMNS
OPINIONS
ZEICHICK'S TAKE
EMBEDDED NEWS
TEST & QA REPORT
ECLIPSESOURCE
SPECIAL REPORTS
SD TIMES 100
JOB BOARD
EVENTS CALENDAR
RESOURCE CENTER
WEBINAR CENTER
ADVANCED SEARCH
RSS
ON THE WEB
SITE MAP
ADVERTISE
EDITORIAL
PRIVACY POLICY
CONTACT US
REPORT A BUG
PRINT EDITION
SUBSCRIBE NOW!
CURRENT ISSUE
BACK ISSUES
SUBSCRIBER SERVICES
BZ MEDIA
ABOUT US
NEWS
BZ RESEARCH
SYSMANNEWS
ST&P MAGAZINE
STPCON
ECLIPSEWORLD
ADVERTISER LINKS
activePDF
Alexsys
Altova
Amyuni Technologies
Automated QA
Axosoft
Business Objects
Codejock Software
ComponentOne
Coverity
Data Dynamics
Developer Express
dtSearch
Dundas
Dynamsoft
Hewlett-Packard
IBM
Imagix
Infragistics
InstallAware Software
InterSystems
iWay
Kovair
LEAD Technologies
McObject
Microsoft
MKS
No Magic
nsoftware
Parasoft
Pegasus Imaging Corp
Perforce
Prezza Technologies
Programmer's Paradise
Programming Research
Rally Software Dev
Red Gate Software
ScaleOut
Seapine
Serena
Software FX
Sparx Systems
Swell Software
Syncfusion
TechExcel
Telerik
UrbanCode
WANdisco
Xceed Software
LOADING...
LOADING...
AS OF 8/7/2008 4:21PM EST
Learning Java: What a Choice!
By
Andrew Binstock
January 1, 2007 —
In his remarkable little book The Paradox of Choice, Barry Schwartz discusses the downside of having too many choices at the store: too much time deciding between items that are different in minor ways, uncertainty over whether youve bought the best item, and because of these factors, an inability to completely enjoy your purchase. For some items, like crackers or jeans, this dilemma is not terribly important, because the cost of the item is low enough. However, when it comes to items that require a time investmentsuch as booksyou do want to make the choice correctly the first time.
One programming area with a surfeit of choices is Java programming textbooks. There are at least several solid options, beyond the hopelessly optimistic popular titles, such as Teach Yourself Java in 24 Hours and Java in 21 Days. I want to focus on the best books, which all presume you already know how to program. As youll see, most of these books have a lot in common, and several look enough alike that your choice could easily be based on a coin flip rather than a long, deliberate process.
The most famous Java textbook is Bruce Eckels magnum opus, Thinking in Java 4th Edition (Prentice Hall PTR). I do mean magnum: It tips in at 1,482 pages. This book was made famous by Eckels decision to make earlier editions available free online. This edition is not downloadable, but the previous ones (which cover Java through 1.4) are still at
mindview.net/Books
.
Eckels text has two distinguishing traits: First, he drills deeply into many of the implementation aspects of the language, so that you truly understand how your Java code runs. The other trait is his deep understanding of object orientation. He frequently relates features of Java to prototypical OO designs and to other OO languages, such as C++.
Despite its length, the book isnt complete. For example, Eckel never discusses resource bundles, which are a wonderful feature of Java. Eckels code takes some getting used to. He uses a large font, so his style is cramped trying to get everything to fit in one page. My only serious gripe is the heft of the book. At nearly 5 pounds, its hard to hold and carry. To evaluate this text online, download the previous version and youll get a good idea of how thoughtfully this book presents Java.
In Eckels own words, Cay S. Horstmann and Gary Cornells Core Java vols. 1 and 2 (Prentice Hall PTR) cast a bigger net than his book. They cover resource bundles, for example, and tip in at 2,000 pages total. At this size, you dont expect to ever read them, but instead to read the basics in their entirety and then jump to individual chapters of interest. Each book is smaller than Eckels and the source code is formatted more naturally. Choosing between these and Eckels work is a matter of taste.
A smaller version of these two options is Patrick Niemeyer and Jonathan Knudsens Learning Java (OReilly). It has far less code and the explanations miss the depth found in Core Java and Eckels book. Although its well written, I am not sure to whom I would recommend in preference to the other titles discussed here.
The next two books cover Java qua language and touch only on the key API sets, rather than diving into the near-endless ocean of functions. Head First Java, by Kathy Sierra and Bert Bates (OReilly), is a fun book that relies on cartoons, funny commentary and exercises like Pretend Youre the Compiler. Its light nature should not belie its ability to communicate language concepts very effectively. I recommend it especially to readers who want a gentle introduction to Java. Its one obvious shortcoming is the difficulty of using it later as a reference, as the factual nuggets appear in a stream of games, puzzles and irreverent comments. Otherwise, its a fun way to learn.
Finally, for those who want something more serious but dont require the omnibus tomes, theres The Java Tutorial 4th Edition, by Zakhour et al. (Addison-Wesley Professional). In 600 pages, it presents all of the language proper, with well-chosen code examples, plus the basics of the major API sets. Its put out by the same team that developed Suns outstanding online Java tutorials (
java.sun.com/docs/books/tutorial
), which might be the best tutorials ever developed for any language. Get this book to start with, unless one of the others has a particular feature you feel is critical. Either way, youll be treated well.
Andrew Binstock is the principal analyst at Pacific Data Works. Read his blog at
binstock.blogspot.com
.
EMAIL THIS ARTICLE
SEND FEEDBACK
MORE COLUMNS
 
SUBSCRIBE TODAY!
E-Newsletters:
News on Mon/Thurs.
Test & QA Report
EclipseSource
SUBMIT
 
JOB BOARD
PDF & PRINT EDITION
* Requires Resource Account! 
LOGIN
or
SIGN UP
*
Download Current Issue!
ISSUE 8/1/2008 PDF
*
Need Back Issues?
DOWNLOAD HERE
Receive The Print Edition?
SUBSCRIBE HERE
 
EVENTS CALENDAR
SHARE 2008
8/10/2008 to 8/15/2008
San Jose
SHARE
ACM SIGGRAPH
8/11/2008 to 8/15/2008
Los Angeles
ACM SIGGRAPH
Intel Developer Forum
8/19/2008 to 8/21/2008
San Francisco
Intel
Business of Software 2008
9/3/2008 to 9/4/2008
Boston
Red Gate Software
VSLive New York
9/7/2008 to 9/10/2008
New York City
1105 Media
REGISTER
MORE EVENTS
GET NOTIFIED!
About all of the latest Resources
SD TIMES 100
6th Annual SD Times 100
It's time once again to
recognize the organizations
or individuals that have
demonstrated leadership in
their markets.