The 9 books listed in this article are all considered great books in the Java programmer community. When a programmer starts learning Java, his first question should be how to choose a book as a guide to learn Java. This question also shows that compared to other tutorials and blogs, Java books are still very important references, mainly reflected in the following two points
Usually books are written by more authoritative programmers.
Compared with other media, books describe the content in more detail and explain it more clearly.
The nine books listed in this article are my personal favorite Java books. When I have time, I will hold them in my hands and read them. I even read some books many times, and I always gain new insights every time I re-read them. Therefore, these books are also the books that most Java programmers like.
Head First Java
Head First Java is the most suitable book for all programming or Java beginners. I like the relaxing and entertaining Head First style. This should be the most interesting book about Java. No matter you are beginner, intermediate or advanced, you can benefit from it. By studying this book, you can learn about programming knowledge such as classes, objects, threads, and collections, as well as language features such as generics, enumerations, variable parameters, and autoboxing. This book also covers Swing, network programming, IO operations, etc. in advanced Java programming, which can give beginners a relatively complete concept of Java. If you are a Java beginner, don't hesitate, this book is best for you. View details: Amazon
Head First Design Pattern
Head First Design Pattern is another book in the Head First series. Written by Kathy Sierra and her team. When I started reading this book in 2006, I didn't know much about design patterns. What problems does design pattern solve, how to solve the problem, how to use design pattern, and what are the benefits of design pattern? I can hardly answer these questions. But when I finished reading this book, everything suddenly became clear. In the chapter introducing inheritance and composition in this book, simple and interesting examples are used to raise and solve problems step by step, and finally arrive at the optimal solution. This book will have many summary points, humorous dialogues, exercises, and famous word puzzles to help you better understand design patterns. If you want to learn about design patterns in Java, take this book with you. View details: Amazon
Effective Java
Effective Java is also my favorite book. This book is written by Joshua Block, who led the development of the Java collection framework and concurrency API package. This book is suitable for Java programmers with several years of development experience. Through this book, we can learn many best practices in programming, and learn from JDK contributor Brock. Effective Java is a highly rated book in terms of quality, content, and question-answering, so reading this book will be a great experience. In addition, the chapters in this book are relatively lightweight and have low coupling with other chapters, so it can be read during travel or leisure time. In terms of content, Effective Java covers the best solutions from static factories, serialization, equals and hashcode to generics, enumerations, variadic parameters and reflection. This book's explanation of various aspects of Java knowledge will benefit you a lot. View details: Amazon
Concurrency Practice in Java
Another classic by Joshua Block. Of course, the other main author of this book is Doug Lea (who influenced two major changes in Java history) God). This book is virtually the authority on Java concurrency and multi-threaded programming, and is a must-read for hardcore Java developers. The power of this book is mainly reflected in the fact that this book describes many (small) details in multi-threading and concurrency in great detail.
This book does not focus on the implementation of core Java code, but focuses on problems caused by concurrency, such as deadlock, starvation, thread safety, and race conditions, and then provides feasible methods to solve these problems. Therefore, this book can very well help developers understand and master the concurrency package and its CountDownLatch, CyclicBarrier, BlockingQueue, and Semaphore classes. That's why I read this book over and over again.
The examples in the book are concise and clear and can describe the problem very well.
Clear explanation: This book explains very well what is wrong, why it is wrong, and how to correct it. This is one of the reasons why this book is so popular.
View details: Amazon
Java Generics and Collections
This book is a successful book from O’Reilly, written by Naftalin and Philip Wadler. As the title of the book suggests, the content of this book focuses on generics and collections, two core aspects of the Java language. This book will be of great help to programmers with programming experience in strengthening their understanding and mastery of collections and generics. This book introduces the API of each collection, Set, List, Map, Queue, and their implementation in detail, and compares their performance in different scenarios. The comparison charts at the end of each chapter are great. View details: Amazon
Java performance
This book is my personal favorite. This book focuses on performance monitoring, performance analysis and how to use tools to analyze performance. This book is different from other programming books because it involves many details of the Java virtual machine, garbage collection mechanism, Java heap memory monitoring and program performance analysis. The chapter about JVM is very well written and worth chewing on. Note that this book is at an advanced level of programming and reading requires sufficient Java programming experience. Junior and intermediate Java developers can also read this book and learn different levels of useful information. So, you want to do some performance tuning, put this book on your bookshelf. View details: Amazon
Java Puzzlers
Introducing another book written by the great Joshua Block. The other author of this book is Neal Gafter (who has moved to Microsoft to be the Donet Compiler technology lead). This book talks about edge cases and pitfalls in the Java language. Compared with C++, Java is safer and lower-risk. The JVM has a garbage collection mechanism, which allows Java programmers to not worry about memory allocation and release, which greatly improves program development efficiency. But sometimes, even experienced programmers get tripped up by corner cases or pitfalls in Java. This book lists and describes in detail these pitfalls in Java. If you like to get to the bottom of things, this book is for you. Through this book, you can learn a lot of core knowledge of Java and know your own Java level. I prefer the above-mentioned Effective Java and Concurrency Practice in Java by Joshua Block. But if you are interested, you can still try it. To maximize your gains, try solving the problems in the book first and then compare them with the explanations in the book. View details: Amazon
Head First Object Oriented Analysis and Design
This is a book about object-oriented programming that belongs to the Head First series. It is recommended to read this book in conjunction with the Head First design pattern for better results. This book focuses on object-oriented design principles, such as using more composition and less inheritance, programming for interfaces rather than implementations, and don't repeat yourself. This book can help you write good code and optimize it based on best practices. Of course, the content in this book is also suitable for programmers using other object-oriented languages. If you want to learn object-oriented coding and design rules, start reading this book now. View details: Amazon
Thinking in Java
Thinking in Java book should be the most famous book in the Chinese Java community, also known as Java programming thinking in Chinese. The author is Bruce Eckel, who is also the author of Thinking in C++. He talks about Java from his own unique point of view. As far as I know, this book has received high recognition and is a comprehensive Java learning reference book. If you don't like Head First's explanations, which are similar to the villain's book, you can try this book. The content of this book is explained in detail and maturely (it feels like a textbook compared to Head First). View details: Amazon
This is my recommended book about Java programming. These can be said to be classics among classics. I have read series like Effective Java and Head First many times. I believe that after reading this article, you should be able to choose the book that best suits you based on your level and the focus of knowledge you want to improve.