Preface
James Gosling, the father of Java: "I wish I had this book 10 years ago. Some people may think I don't need any Java books, but I need this book."
From its birth to its perfection, Java has undergone continuous development and growth. At present, there are thousands of Java developers in the world. How to write code that is clearer, more correct, more robust and easier to reuse is one of the goals that everyone pursues.
Java is an object-oriented programming language launched by Sun in May 1995.
I have to mention here that the author of this book, JoshuaBloch, was an outstanding engineer at Sun, and led the team to design and implement countless Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework.
He is also the recipient of the Jolt Award and is now the chief Java architect of Google . He brought us a total of 78 rules of thumb for programmers: the most effective and practical solutions to the programming problems you encounter every day.
This book introduced 78 empirical rules of extremely high practical value in Java process designing. Through a comprehensive analysis of the technologies used by Java design experts , it reveals how to produce clear, robust and efficient code.
The book is divided into 11 chapters with 78 entries
There are too many more detailed knowledge points, so I won't show them one by one. After you get it, you can watch it yourself!
Chapter 1 Introduction
Chapter 2 explains when to create objects, under what circumstances can avoid creating objects, how to ensure that these objects can be destroyed in a timely manner, and how to manage all cleanup actions that must be performed before destruction.
Chapter 3 explains the methods common to all objects in Java, such as a fairly in-depth analysis of equals, hashCode, toString, clone, and finalize, so that you can avoid making mistakes on these issues in the future.
Chapter 4 describes some guiding principles as the core of the Java language and basic abstract units (classes and interfaces) to help you make better use of these elements, so as to design more useful, robust and flexible classes and interfaces .
Friends who need to receive this PDF, please help three consecutive articles, and then follow the official account at the end of the article to get it directly.
Chapters 5 and 6 respectively describe the best practices of generics and enumerations and annotations, and teach you how to maximize these advantages while making the whole process as simple as possible.
Chapter 7 discusses several aspects of method design: how to deal with parameters and return values, how to design method signatures, and how to document methods. Thereby there is a further improvement in usability, robustness and flexibility.
Chapter 8 mainly discusses the specific details of the Java language, from the processing of local variables, the control structure, the use of class libraries, to the usage of various data types, and two special mechanisms (reflection and native method, reflection mechanism and Local method). Finally, optimization and naming conventions are explained.
Chapter 9 explains how to take advantage of the abnormalities, such as improving the readability, reliability, and maintainability of the program, and reducing the negative effects of improper use. Finally, some guidelines for using exceptions are provided.
Chapter 10 explains in detail how to help you write a clear, correct, well-documented concurrent program.
Chapter 11 explains the serialization technology, and there is a feature worth mentioning in particular: the serialization proxy (serialization proxy) mode, which can help you avoid many defects of object serialization.
Did you really want it after reading it? Don't worry! There is also a third edition
Compared with the second edition, the number has increased from 78 to 90, and all the original information has been comprehensively revised
Friends in need can help after three consecutive articles, follow the public account below to get it for free! !
At last
You are welcome to write the topics you care about in the comment area. I will choose the topic as a follow-up, and hope to create more content that everyone likes.
Interview to make rockets, to screw the screws on entry, I hope to help you.
Repost a lot to benefit more people! !