| 1 | Here is the items in the book EffectiveJava. This list is copied from: http://my.safaribooksonline.com/book/programming/java/9780137150021 |
| 2 | |
| 3 | == Chapters == |
| 4 | ||Chapter 2. Creating and Destroying Objects || 1 ~ 7 || |
| 5 | ||Chapter 3. Methods Common to All Objects || 8 ~ 12 || |
| 6 | ||Chapter 4. Classes and Interfaces || 13 ~ 22 || |
| 7 | ||Chapter 5. Generics || 23 ~ 29 || |
| 8 | ||Chapter 6. Enums and Annotations || 30 ~ 37 || |
| 9 | ||Chapter 7. Methods || 38 ~ 44 || |
| 10 | ||Chapter 8. General Programming || 45 ~ 56 || |
| 11 | ||Chapter 9. Exceptions || 57 ~ 65 || |
| 12 | ||Chapter 10. Concurrency || 66 ~ 73 || |
| 13 | ||Chapter 11. Serialization || 74 ~ 78 || |
| 14 | |
| 15 | |
| 16 | == 78 items == |
| 17 | * Chapter 2. Creating and Destroying Objects |
| 18 | * Item 1: Consider static factory methods instead of constructors |
| 19 | * Item 2: Consider a builder when faced with many constructor parameters |
| 20 | * Item 3: Enforce the singleton property with a private constructor or an enum type |
| 21 | * Item 4: Enforce noninstantiability with a private constructor |
| 22 | * Item 5: Avoid creating unnecessary objects |
| 23 | * Item 6: Eliminate obsolete object references |
| 24 | * Item 7: Avoid finalizers |
| 25 | * Chapter 3. Methods Common to All Objects |
| 26 | * Item 8: Obey the general contract when overriding equals |
| 27 | * Item 9: Always override hashCode when you override equals |
| 28 | * Item 10: Always override toString |
| 29 | * Item 11: Override clone judiciously |
| 30 | * Item 12: Consider implementing Comparable |
| 31 | * Chapter 4. Classes and Interfaces |
| 32 | * Item 13: Minimize the accessibility of classes and members |
| 33 | * Item 14: In public classes, use accessor methods, not public fields |
| 34 | * Item 15: Minimize mutability |
| 35 | * Item 16: Favor composition over inheritance |
| 36 | * Item 17: Design and document for inheritance or else prohibit it |
| 37 | * Item 18: Prefer interfaces to abstract classes |
| 38 | * Item 19: Use interfaces only to define types |
| 39 | * Item 20: Prefer class hierarchies to tagged classes |
| 40 | * Item 21: Use function objects to represent strategies |
| 41 | * Item 22: Favor static member classes over nonstatic |
| 42 | * Chapter 5. Generics |
| 43 | * Item 23: Don’t use raw types in new code |
| 44 | * Item 24: Eliminate unchecked warnings |
| 45 | * Item 25: Prefer lists to arrays |
| 46 | * Item 26: Favor generic types |
| 47 | * Item 27: Favor generic methods |
| 48 | * Item 28: Use bounded wildcards to increase API flexibility |
| 49 | * Item 29: Consider typesafe heterogeneous containers |
| 50 | * Chapter 6. Enums and Annotations |
| 51 | * Item 30: Use enums instead of int constants |
| 52 | * Item 31: Use instance fields instead of ordinals |
| 53 | * Item 32: Use !EnumSet instead of bit fields |
| 54 | * Item 33: Use !EnumMap instead of ordinal indexing |
| 55 | * Item 34: Emulate extensible enums with interfaces |
| 56 | * Item 35: Prefer annotations to naming patterns |
| 57 | * Item 36: Consistently use the Override annotation |
| 58 | * Item 37: Use marker interfaces to define types |
| 59 | * Chapter 7. Methods |
| 60 | * Item 38: Check parameters for validity |
| 61 | * Item 39: Make defensive copies when needed |
| 62 | * Item 40: Design method signatures carefully |
| 63 | * Item 41: Use overloading judiciously |
| 64 | * Item 42: Use varargs judiciously |
| 65 | * Item 43: Return empty arrays or collections, not nulls |
| 66 | * Item 44: Write doc comments for all exposed API elements |
| 67 | * Chapter 8. General Programming |
| 68 | * Item 45: Minimize the scope of local variables |
| 69 | * Item 46: Prefer for-each loops to traditional for loops |
| 70 | * Item 47: Know and use the libraries |
| 71 | * Item 48: Avoid float and double if exact answers are required |
| 72 | * Item 49: Prefer primitive types to boxed primitives |
| 73 | * Item 50: Avoid strings where other types are more appropriate |
| 74 | * Item 51: Beware the performance of string concatenation |
| 75 | * Item 52: Refer to objects by their interfaces |
| 76 | * Item 53: Prefer interfaces to reflection |
| 77 | * Item 54: Use native methods judiciously |
| 78 | * Item 55: Optimize judiciously |
| 79 | * Item 56: Adhere to generally accepted naming conventions |
| 80 | * Chapter 9. Exceptions |
| 81 | * Item 57: Use exceptions only for exceptional conditions |
| 82 | * Item 58: Use checked exceptions for recoverable conditions and runtime exceptions for programming errors |
| 83 | * Item 59: Avoid unnecessary use of checked exceptions |
| 84 | * Item 60: Favor the use of standard exceptions |
| 85 | * Item 61: Throw exceptions appropriate to the abstraction |
| 86 | * Item 62: Document all exceptions thrown by each method |
| 87 | * Item 63: Include failure-capture information in detail messages |
| 88 | * Item 64: Strive for failure atomicity |
| 89 | * Item 65: Don’t ignore exceptions |
| 90 | * Chapter 10. Concurrency |
| 91 | * Item 66: Synchronize access to shared mutable data |
| 92 | * Item 67: Avoid excessive synchronization |
| 93 | * Item 68: Prefer executors and tasks to threads |
| 94 | * Item 69: Prefer concurrency utilities to wait and notify |
| 95 | * Item 70: Document thread safety |
| 96 | * Item 71: Use lazy initialization judiciously |
| 97 | * Item 72: Don’t depend on the thread scheduler |
| 98 | * Item 73: Avoid thread groups |
| 99 | * Chapter 11. Serialization |
| 100 | * Item 74: Implement Serializable judiciously |
| 101 | * Item 75: Consider using a custom serialized form |
| 102 | * Item 76: Write readObject methods defensively |
| 103 | * Item 77: For instance control, prefer enum types to readResolve |
| 104 | * Item 78: Consider serialization proxies instead of serialized instances |