August 22, 2019 | Download a PDF of this article
There are many Java tutorials on the market. Most of them are academic volumes intended to teach both Java and programming fundamentals to their readers. Remove those and you’re left with a handful of possibilities—many of them good. But for my purposes, by far and away, the best is Core Java by Cay Horstmann. This new edition, which covers material through Java 11, maintains the high standard set by previous editions.
What distinguishes Core Java from the other books is the breadth of coverage (1800+ pages between the two volumes), the clarity of explanations, and the author’s uncanny ability to anticipate the questions a reader will have. The explanations are frequently enhanced by full but short programs, rather than the snippets favored by other authors. As a result, the books can serve as reference volumes, as well as tutorials. For this reason, they sit on the bookshelf closest to my workstation in the center of the shelf at eye level. They are my go-to reference volumes when I need more information than Javadoc provides.
The 11th edition is the first revision to come out since Java 8 (which counterintuitively was covered by the 10th edition), so it contains many updates. Java modules, JShell, changes in streams and collections, and numerous other updates are included. There is enough new material that purchasers of the 10th edition should seriously consider upgrading, as it has now been more than three years since those volumes first appeared.
There is enough new material that purchasers of the 10th edition should seriously consider upgrading, as it has now been more than three years since those volumes first appeared.
Another limitation is the partitioning of topics in the two books. They are ostensibly broken out into fundamentals (Volume 1) and advanced features (Volume 2). However, Volume 1 spends a lot of pages on AWT programming, which is not fundamental in anyone’s definition of the term. Meanwhile, file I/O, which is fundamental in all senses of the term, is located in Volume 2. This means that you really need to buy both volumes to get full coverage of the language. Bought together they cost US$120 in North America, which is a lot. In addition, the odd division of topics across the volumes sometimes means you need to search in both volumes to find what you’re looking for.
While pricing and convenience are certainly factors to consider, for most Java developers an investment in Core Java is well worth it and recommended.
Also in This Issue
Know for Sure with Property-Based Testing
Arquillian: Easy Jakarta EE Testing
Unit Test Your Architecture with ArchUnit
The New Java Magazine
For the Fun of It: Writing Your Own Text Editor, Part 1
Quiz Yourself: Using Collectors (Advanced)
Quiz Yourself: Comparing Loop Constructs (Intermediate)
Quiz Yourself: Threads and Executors (Advanced)
Quiz Yourself: Wrapper Classes (Intermediate)