1th Chapter Introduction 2nd Chapter Create and destroy an object 1th: Consider replacing the constructor with a static factory method 2nd: Consider using the builder 3rd bar when encountering multiple constructor parameters: use a private constructor or enum type to harden the Singleton property 4th bar: The ability to harden non-instancing through a private constructor 5th: Avoid creating unnecessary objects 6th bar: Eliminate outdated objects Reference 7th: Avoid using the terminating function, chapter 3rd Methods common to all objects 8th: Overwrite equals when you follow the General Convention 9th: Overwrite equals when always overwrite hashcode 10th: always overwrite the tostring 11th: carefully rewrite the clone 12th: Consider implementing the comparable interface 4th Chapter Classes and Interfaces 13th: Minimizing the accessibility of classes and members 14th: Use access methods in public classes instead of public domain 15th: make non-variability minimized 16th: compound takes precedence over inheritance 17th: It is either designed for inheritance, and provides documentation descriptions, Or it's forbidden to inherit 18th: interface is better than abstract class 19th: interface is only used for defining type 20th: Class hierarchy is better than label class 21st: Use function object to represent policy 22nd: Prioritize static member class 5th chapter Generic 23rd: Do not use the original ecological type in the new Code 24th: Elimination of non-inspected warnings 25th: List takes precedence over the array 26th: prioritize generic 27th: Prioritize generic methods 28th: Leverage the flexibility of the restricted wildcard Fraiti API 29th bar: Prioritize type-safe heterogeneous containers 6th Chapter Enumerations and annotations 30th: Substituting an enum with an int constant 31st: Substituting an instance field for the ordinal 32nd: using Enumset instead of the bit field 33rd bar: Using Enummap instead of ordinal index 34th bar: Simulating a scalable enumeration with an interface the 35th bar: annotations take precedence over named patterns 36th: Persist with override annotations 37th: Define the type with the tag interface 7th Chapter Method 38th: Check the validity of the parameter 39th: protective Copy if necessary 40th: Careful design method signature 41st: Use heavy duty 42nd: Caution with variable parameters (varargs) 43rd: Returns an array or set of 0 lengths, Instead of NULL 44th: Document comments for all exported API elements Chapter 8th general programming 45th: Minimizing scope of local variables 46th: For-each loops take precedence over traditional for loop 47th bars: Understanding and Using Class Libraries 48th: If you need precise answers, Avoid using float and double 49th: primitive types take precedence over boxed primitive type 50th: If other types are more appropriate, Try to avoid using the string 51st: Understanding the performance of string connections 52nd: referencing objects by Interface 53rd article: interface takes precedence over reflection mechanism 54th: use local side sparinglyLaw 55th: Careful optimization 56th: adherence to universally accepted naming conventions 9th exception 57th: Exception-only conditions are used for exceptions 58th: Use exceptions for recoverable conditions, Using run-time exceptions for programming errors 59th: Avoid unnecessary use of the exception that is examined 60th: try to use the standard exception 61st: throws an exception corresponding to the abstract 62nd: All exceptions thrown by each method must have a document 63rd: contains the failure-capture information in the detail message 64th: Try to keep the failure in the Atomic 65th Bar: Do not ignore exceptions chapter 10th Concurrent 66th: Synchronizing access to shared variable data 67th: Avoid too many synchronizations 68th: Executor and task precedence over thread 69th: Concurrency tool takes precedence over wait and notify 70th: Document for thread security 71st: Use deferred initialization 72nd bar: Do not rely on thread scheduler 73rd: Avoid using thread groups 11th serialization 74th: Implement serializable 75th: Consider using a custom serialization form, 76th: Write the ReadObject method in a protective way 77th: for instance control, Enum type takes precedence over Readresolve 78th: Consider using a serialization agent instead of a serialized instance
Reading notes--effective Java; directory structure, easy to review and find