| title | Must-Read Classic Java Books |
|---|---|
| category | Computer Books |
| icon | java |
"Head First Java" is a light and enjoyable book, and I can say it's one of my favorite books from the early days of learning programming. This book is also my introductory book to Java. Thanks to its help in the early stages, I managed to step into the world of Java programming.
I believe I could stick with Java because of this book's significant role. Many of my friends also started learning Java with this book.
Many folks ask: Is this book suitable for programming beginners?
In my opinion, this book is quite suitable for programming newcomers since it belongs to the "Head First" series.
Java Core Technology Volume 1 + Volume 2
These two books are also excellent. However, they contain a lot of information, and reading them in full can be quite time-consuming. I currently use these two books as reference manuals; for instance, when I encounter some fundamental Java issues while writing articles, I often refer back to these books.
I bought these two books while in college and kept them in my dorm room for casual reading. I recommend reading them after getting a foundational understanding of Java because they are quite in-depth and comprehensive—highly recommended.
Additionally, the author of this book published a new book last year, On Java, which I recommend more. It has updated content and covers three long-term support versions of Java (Java 8, 11, and 17).
After all, this is currently the only technical book on the market that explains three long-term support versions of Java (Java 8, 11, 17).
Java 8 is a milestone version; it is still widely used in many enterprises. Mastering new features like Lambda and Stream API in Java 8 is quite necessary. For this, I recommend Java 8 in Action.
A very low-key excellent book, which offers deeper content compared to beginner books. It's suitable for beginners as well as anyone reviewing Java basics.
The Beauty of Concurrency Programming in Java
This book is very suitable for learning Java multithreading. The explanations are straightforward, and the author skillfully covers everything from the basics of concurrency to practical applications.
Additionally, the author often publishes various technical articles online. This book is the culmination of years of work in the multithreading field! The content in the book is largely explained in conjunction with code, making it very persuasive!
Practical Java High-Performance Concurrency
This is the second book I recommend, which is well-suited as an introductory or advanced book on multithreading. The content combines theory with practical applications, and the explanations for each knowledge point are quite understandable with a clear overall structure.
This open-source book is authored by several prominent figures from leading companies. In writing In-Depth Java Multithreading, these authors read a multitude of books and blogs on Java multithreading and combined their experience with examples and source code analysis to create this book.
The quality of this book is also very solid! Kudos to the authors! This book has standardized formatting and writing style, clear expression, and logic. Furthermore, after each draft, the authors review each other's work, and all members re-evaluate before merging into the main branch. Finally, the entire manuscript was revised three times.
Online reading: https://redspider.gitbook.io/concurrent/.
Principles of Java Concurrency: JDK Source Analysis
This book primarily explains the important source code in the Java Concurrent package and also covers essential concurrency concepts such as JMM, happen-before, CAS, etc.
Whether you want to deeply study Java concurrency or prepare for interviews, this book is worth checking out.
In-Depth Understanding of the Java Virtual Machine
This book can be described in one sentence: A fighter among domestic books, genuinely excellent! (I sincerely hope more quality books like this can emerge in the industry! Keep it up! 💪)
The third edition of this book was published at the end of 2019, adding a lot of practical content, including the principles of new-generation garbage collection like ZGC. It holds a high rating of 9.5 on Douban, which speaks for itself!
Whether you are preparing for an interview or seeking deeper knowledge in the Java field, you cannot overlook this book. It’s necessary not just to read this book but to read it multiple times as it is packed with valuable insights. The book also includes practical components, and I recommend following along with practical exercises.
Other similar books include Practical Java Virtual Machine and Design and Implementation of Virtual Machines: Taking JVM as an Example, both of which are excellent!
If you are particularly interested in practical operations and want to write a simple JVM yourself, you can check out Let's Write a Java Virtual Machine.
The code in this book is implemented in Go. Once you understand the principles, you can try writing one in Java, which can serve as practice! If you currently lack the capacity to replicate a JVM independently in Java, you can find many implementations based on Java online, such as Zachaxy's Handwritten JVM Series.
This book currently holds a rating of 8.2 on Douban. I personally believe that teacher Zhang Xiuhong has done an excellent job, and this book deserves a higher rating.
Additionally, R Da's article Learning JVM Implementation from the Inside Out on Douban also recommends many excellent JVM-related books, which I encourage you to check out.
I will also recommend two videos for those who prefer learning through video.
The first is Complete JVM Tutorial by Teacher Song Hongkang from Shang Silicon Valley. This course is very rigorous, consisting of nearly 400 sections.
The course content is divided into three parts:
- Memory and Garbage Collection
- Bytecode and Class Loading
- Performance Monitoring and Tuning
The second is the tutorial JVM Parameters [Memory Edition] by You Jiao Ben, which is quite impressive!
Very important! Extremely important! Especially Git and Docker.
- IDEA: Familiarize yourself with basic operations and commonly used shortcuts. Related materials: IntelliJ IDEA Simplified Chinese Tutorial.
- Maven: Strongly recommend spending a few days learning about Maven before diving into common frameworks. (It’s a real hassle to find and download jar files; using Maven can save you a lot of trouble.) Further reading: Maven Core Concepts Summary.
- Git: Basic Git skills are also essential; try to host your code on GitHub as you learn. Further reading: Git Core Concepts Summary.
- Docker: Learn to use Docker to install and manage software needed during learning, like MySQL; this can save you a great deal of time. Related materials: Docker - From Beginner to Practice.
In addition to these tools, I strongly recommend you thoroughly understand how to use GitHub. For some handy tips on using GitHub, you can check out the article Practical Tips for Using GitHub.
For frameworks, I suggest looking at official documentation or blogs.
Spring and SpringBoot are truly important!
Make sure to understand AOP and IOC concepts. The scope and lifecycle of beans in Spring, the workings of SpringMVC, and other such knowledge are very important and must be grasped.
If you work in Java backend development, you can’t do without SpringBoot; it is an essential skill you need to master! You must learn it thoroughly!
You should also understand how to integrate SpringBoot with common technologies like MyBatis, ElasticSearch, SpringSecurity, Redis, etc.
Here are some recommended books/columns.
Not recommended as an introductory book; for starters, look for books or videos by Chinese authors. This book serves as an overview of Spring, containing introductions to some basic concepts and examples, covering various aspects of Spring but not in great depth. As the author writes on the last page: "Learning Spring is just the beginning."
This book provides a detailed introduction to the new features of Spring 5, but it's not particularly outstanding. Additionally, the translation seems a bit awkward, and the content feels somewhat dry. I usually use this book as a reference manual.
Spring Boot Programming Principles (Core Edition)
It’s a bit verbose, but the principle explanation is quite clear.
SpringBoot analysis; it’s not suitable for beginners. I picked it up last year and only got through a few chapters, couldn't continue further. The book is quite thick and seems to drag on with too many points covered, but it explains the internal principles of SpringBoot very clearly.
A fairly average book; you can simply take a look at it.
MyBatis is widely used in China, and I recommend not spending too much time on it. However, the source code of MyBatis is definitely worth studying, as it contains excellent coding practices. Here are two books that explain MyBatis source code.
Handwriting MyBatis: Progressive Source Code Practice
A book published by my good friend, Xiao Fu Ge. This book focuses on practical aspects, avoiding the complexities found in the MyBatis source code, honing in on core logic, simplifying the coding process, and adopting a progressive development approach to gradually implement core functionalities in MyBatis.
The accompanying project repository for this book can be found at: https://github.com/fuzhengwei/small-mybatis.
Guidance for Reading Generic Source Code: MyBatis Source Code Explanation
This book explains the process and method of reading the MyBatis open-source code! It provides a detailed analysis of over 300 classes in the MyBatis source code, including background knowledge, organizational structure, logical frameworks, and implementation details.
The accompanying example repository for this book can be found at: https://github.com/yeecode/MyBatisDemo.
This book can be used to get started with Netty, covering topics from BIO to NIO, then detailing why Netty exists, why it's useful, and its important knowledge points.
This book basically covers most of the essential knowledge points of Netty and is largely explained through practical examples.
Advanced Netty: Learning Netty Through Case Studies
The content consists of practical examples using Netty, like memory leaks. If you think you've fully grasped Netty and wish to master it further, I recommend reading this book.
Learn Netty from Flash Superman: Real-time Chat Practical and Underlying Principles
A book published in March 2022. It is divided into two parts; the first part introduces you to Netty through a practical case of a real-time chat system, while the second part clarifies the essential underlying principles of Netty through source code analysis.
The Definitive Guide to Java Performance
I hope there will be more excellent books on Java performance optimization!
This is an O'Reilly family book, an introductory text on performance tuning, which I believe is essential knowledge for every Java practitioner.
This book introduces practical content very well, especially regarding JVM tuning, though it has some notable downsides—specifically that its content feels a bit outdated. There are very few books like this available on the market. It’s not suited for beginners, so it’s advisable to have a good understanding of Java before reading it. Additionally, it's best to review Zuo Zhiming's In-Depth Understanding of the Java Virtual Machine beforehand.
I’ve read many books about website architecture, such as "Core Principles and Case Studies of Large-Scale Website Architecture," "Core Technologies for Websites with Hundreds of Millions of Visits," and "The Path of Architectural Refinement—Practicing Core Technologies like Hundred Million Gateways, Platform Openness, Distributed Systems, Microservices, Fault Tolerance, etc."
Currently, the only books I can recommend are Learning Architecture from Scratch by Teacher Li Yunhua and Software Architecture Design: The Path to Merging Large-Scale Website Technical Architecture with Business Architecture by Teacher Yu Chunlong.
"Learning Architecture from Scratch" corresponds to a Geek Time column—"Learning Architecture from Scratch." Much of the content in this book overlaps with that of the column, so you can opt for one of them. I have only read a small portion, but it is quite comprehensive and genuinely discusses how to design architecture.
This book covers discussions on transactions and locks, distribution (CAP, distributed transactions, etc.), high concurrency, and high availability.
JavaGuide Interview Attack Edition
This is the interview version from JavaGuide, covering most of the knowledge points related to Java backend, including collections, JVM, multithreading, and the database MySQL.
You can get it for free by replying with “Interview Attack” on the official account without any strings attached.





























