6 Must Read Books for Java Programmers
Java books enable programmers to learn the language and the best practices followed by seasoned programmers. It gives you the confidence that you understand the language and use it correctly in your programming projects.
There are a large number of Java books available in the market. In this post, I will give an overview of the top 6 Java books every advanced Java programmer must read. Not all books mentioned are strictly on Java language, but they are super relevant for Java programmers.
Please note that most of these books (except the last one) are based on Java 6 or 7. Java 8 introduces a number of advanced concepts impacting how programs are structured. Using functional programming introduced in Java 8, it is possible to write concise code. However much of the best practices given in these books are still valid in Java 8.
If you are a new Java programmer, you should first read the Java official tutorial before reading these books. This tutorial always covers the latest version of the Java language (as of writing this post, it is Java 8). Before digging into these books, you should also take a look at object oriented programming concepts.
Here are my top 6 must read books for Java programmers. You should read these books in the order given below,
1. Core Java Volume I - Fundamentals by (9th Edition) by Cay S. Horstmann and Gary Cornell
Core Java Volume 1 by Cay S. Horstmann and Gary Cornell is a comprehensive book on Java language fundamentals. This book is over 1000 pages long and covers everything from basics of the Java language, classes and objects, event handling and swing library, generics, collections and multi-threading. Core Java book covers each topic in depth and uses Eclipse IDE as the development environment.
The book I have reviewed is the 9th Edition which covers Java 7 platform. A new 10th edition is under development (at the time of writing this blog post) and it would cover Java 8 platform. You should buy the latest edition available for purchase.
Core Java Volume I is a an excellent reference for the Java language and every Java programmer should have it in their library.
2. Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides(Gang of Four)
Design Patterns: Elements of Reusable Object-Oriented Software is a catalogue of software designs that are suitable for an object oriented programming environment. Whenever you come across a complex software design problem in Java, you should take a look at these design patterns and decide whether one of them is appropriate for your solution.
Popularly known as Gang of Four book, Design Patterns contains over 23 common software patterns that will enable programmers to create flexible and reusable software. Each pattern is carefully explained with purpose of the design pattern, the motivation, applicability of the pattern, structure, objects participating in the pattern, implementation, sample code, known uses and related patterns. Code samples are in C++ language.
However please note that if you are novice programmer, you may get confused about some of these patterns. That is ok and over years you will begin to understand importance of each pattern and you will need to keep coming back to these patterns. This is another must have book for any programmer working on object oriented languages.
3. Effective Java (2nd Edition) by Joshua Bloch
Effective Java by Joshua Bloch is one of the best books ever produced on the Java language. Joshua Bloch worked on the core Java platform and was responsible for design of Java Collections framework. In this book, he provides a set of rules (78 in total!) for building high quality Java programs.
Each of the coding tips in Effective Java is thoroughly explained and is backed with plenty of code samples. This book will also help you in understanding how design decisions are made in core Java libraries. If you can afford only one book, this is the book to buy!
4. Refactoring: Improving the Design of Existing Code by Martin Fowler, Kent Beck and John Brant
Refactoring: Improving the Design of Existing Code by Martin Fowler et al. is an influential book in the world of software design. In this seminal work, Fowler shows us how we can improve the internal structure of a program without changing its external behavior.
The book contains a catalogue of software improvement strategies and all the examples are given in Java. Each entry is well explained with the problem, solution, refactoring mechanism and Java code examples with UML. Fowler also explains the critical role played by test cases in software refactoring.
I think frequent refactoring of code is what distinguishes great programmers from good programmers.
5. Core Java, Volume II--Advanced Features (9th Edition) by Cay S. Horstmann and Gary Cornell
Core Java, Volume II gives a thorough coverage of advanced Java programming topics with a focus on its rich code libraries. This volume contains topics such as streams and regular expressions, XML processing, networking, database programming, advanced swing, advanced AWT, security, JavaBeans, distributed objects etc. This is an essential read for anyone who wants to venture into the world of enterprise Java.
6. Java SE8 for the Really Impatient: A Short Course on the Basics (Java Series) by Cay S. Horstmann
All the books mentioned above is based on Java platform 7 or below. The latest Java 8 platform introduces a number of new programming features such as lambdas for functional programming. Java SE8 for the Really Impatient is a quick look at features in Java 8. Written by Cay S. Horstmann (author of Core Java series), this is concise book (around 200 pages) on new features of Java 8.
This book is intended for Java programmers familiar with Java 7 or 6 and assumes knowledge of the language. It provides an in-depth coverage of Java 8 features such as lambda expressions, streams API, new date/time libraries, JavaFX and more.