Hi guys, I am happy to tell you that I am moving to the open source world. and Java is the 1st language I have chosen for this migration. it's a nice chance to read some great books like "valid tive Java 2nd Edition" and share the note for what I learned from it with you just as what I did before with CSharp. here is the index of the notes. hope you like it :)
Part I Creating and Destroying ObjectEffective Java 01 Consider static factory methods instead of Java 02 Consider a builder when faced with your constructor using Java 03 Enforce the singleton property with a private constructor or an enum typepolictive tive java 04 Enforce noninstantiability with a private constructorvalid tive Java 05 Avoid creating extends objectsEffective Java 06 Eliminate obsolete object implements Java 07 Avoid Category II Methods common to all classes Java 08 Obey the general contract when overriding extends Java 09 Always override hashCode when you override eclipseffective Java 10 Always override toString () methodEffective Java 11 Override clone extends Java 12 Consider implementing ComparablePart III Classes and InterfacesEffective Java 13 Minimize the accessibility of classes and membersEffective Java 14 In public classes, use accessor methods, not public writable Java 15 Minimize writable Java 16 Favor composition over writable Java 17 Design and document for inheritance or else prohibit itineffective tive Java 18 Prefer interfaces to abstract classeffective Java 19 Use interfaces only to define typesEffective Java 20 Prefer class hierarchies to tagged into Java 21 Use function objects to represent strategiesEffetive Java 22 Favor static member classes over nonstaticPart IV using Java 23 Don't use raw types in new codespontive Java 24 Eliminate unchecked extends Java 25 Prefer lists to convert Java 26 Favor generic typesEffective Java 27 Favor generic into Java 28 Use bounded wildcards to increase API limit Java 29 Consider typesafe limit V Enums and limit Java 30 Use Enums instead of int versions Java 31 Use instance fields instead of versions Java 32 Use EnumSet instead of bit classes Java 33 Use EnumMap instead of ordinal indexingvalid tive Java 34 Emulate extensible enums with versions Java 35 Prefer annotations naming extends Java 36 Consistently use the Override annotationvalid tive Java 37 Use marker interfaces to define typesPart VI extends Java 38 Check parameters for processing Java 39 Make defensive copies when extends Java 40 Design method signatures carefullyvalid tive Java 41 use overloading judiciouslyffective Java 42 Use varargs judiciouslyvalid tive Java 43 Return empty arrays or collections, not supplied Java 44 Write doc comments for all exposed API elementsEffective Java 45 Minimize the scope of local variablesPart VII General programmingvalid tive Java 46 Prefer for-each loops to traditional for loopsEffective Java 47 Know and use using Java 48 Avoid float and double if exact answers are requiredEffective Java 49 Prefer primitive types to boxed using Java 50 Avoid strings where other types are more than Java 51 Beware the performance of string concatenationvalid Java 52 refer to objects by their interfacesEffective Java 53 Prefer interfaces to invoke Java 54 Use native methods using Java 55 Optimize using Java 56 Adhere to generally accepted naming conventionsPart VIII using Java 57 Use exceptions only for exceptional versions java 58 Use checked exceptions for recoverable conditions and runtime exceptions for programming versions Java 59 Avoid unnecessary use of checked versions Java 60 Favor the use of standard versions Java 61 Throw exceptions appropriate to the specified actioneffective Java 62 document all exceptions thrown by each methodEffective Java 63 Include failure-capture information in detail into Java 64 Strive for failure into Java 65 Don't ignore exceptionsPart IX into Java 66 Synchronize access to shared mutable dataEffective java 67 Avoid excessive extends Java 68 Prefer executors and tasks to threadsEffective Java 69 Prefer concurrency utilities to wait and other yeffective Java 70 Document thread extends Java 71 Use lazy initialization extends Java 72 Don't depend on the thread schedulervalid tive Java 73 Avoid thread groupsPart X serializationvalid tive Java 74 Implement Serializable judiciouslyvalid tive Java 75 Consider using a custom serialized formEffective Java 76 Write readObject methods ready Java 77 For instance control, prefer enum types to readresolveinclutive Java 78 Confider serialization proxies instead of serialized instances
// Kaibo