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 "Effective 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 Object
Effective Java 01 Consider static factory methods instead of constructors
Effective Java 02 Consider a builder when faced with many constructor parameters
Effective Java 03 Enforce the singleton property with a private constructor or an enum type
Effective Java 04 Enforce noninstantiability with a private constructor
Effective Java 05 Avoid creating unnecessary objects
Effective Java 06 Eliminate obsolete object references
Effective Java 07 Avoid finallizers
Part II Methods common to all Objects
Effective Java 08 Obey the general contract when overriding equals
Effective Java 09 Always override hashCode when you override equals
Effective Java 10 Always override toString() method
Effective Java 11 Override clone judiciously
Effective Java 12 Consider implementing Comparable
Part III Classes and Interfaces
Effective Java 13 Minimize the accessibility of classes and members
Effective Java 14 In public classes, use accessor methods, not public fields
Effective Java 15 Minimize mutability
Effective Java 16 Favor composition over inheritance
Effective Java 17 Design and document for inheritance or else prohibit it
Effective Java 18 Prefer interfaces to abstract classes
Effective Java 19 Use interfaces only to define types
Effective Java 20 Prefer class hierarchies to tagged classes
Effective Java 21 Use function objects to represent strategies
Effetive Java 22 Favor static member classes over nonstatic
Part IV Generics
Effective Java 23 Don't use raw types in new code
Effective Java 24 Eliminate unchecked warnings
Effective Java 25 Prefer lists to arrays
Effective Java 26 Favor generic types
Effective Java 27 Favor generic methods
Effective Java 28 Use bounded wildcards to increase API flexibility
Effective Java 29 Consider typesafe heterogeneous containers
Part V Enums and Annotations
Effective Java 30 Use Enums instead of int constants
Effective Java 31 Use instance fields instead of ordinals
Effective Java 32 Use EnumSet instead of bit fields
Effective Java 33 Use EnumMap instead of ordinal indexing
Effective Java 34 Emulate extensible enums with interfaces
Effective Java 35 Prefer annotations to naming patterns
Effective Java 36 Consistently use the Override annotation
Effective Java 37 Use marker interfaces to define types
Part VI Methods
Effective Java 38 Check parameters for validity
Effective Java 39 Make defensive copies when needed
Effective Java 40 Design method signatures carefully
Effective Java 41 Use overloading judiciously
ffective Java 42 Use varargs judiciously
Effective Java 43 Return empty arrays or collections, not nulls
Effective Java 44 Write doc comments for all exposed API elements
Effective Java 45 Minimize the scope of local variables
Part VII General Programming
Effective Java 46 Prefer for-each loops to traditional for loops
Effective Java 47 Know and use the libraries
Effective Java 48 Avoid float and double if exact answers are required
Effective Java 49 Prefer primitive types to boxed primitives
Effective Java 50 Avoid strings where other types are more appropriate
Effective Java 51 Beware the performance of string concatenation
Effective Java 52 Refer to objects by their interfaces
Effective Java 53 Prefer interfaces to reflection
Effective Java 54 Use native methods judiciously
Effective Java 55 Optimize judiciously
Effective Java 56 Adhere to generally accepted naming conventions
Part VIII Exceptions
Effective Java 57 Use exceptions only for exceptional conditions
Effective Java 58 Use checked exceptions for recoverable conditions and runtime exceptions for programming errors
Effective Java 59 Avoid unnecessary use of checked exceptions
Effective Java 60 Favor the use of standard exceptions
Effective Java 61 Throw exceptions appropriate to the abstraction
Effective Java 62 Document all exceptions thrown by each method
Effective Java 63 Include failure-capture information in detail message
Effective Java 64 Strive for failure atomicity
Effective Java 65 Don't ignore exceptions
Part IX Concurrency
Effective Java 66 Synchronize access to shared mutable data
Effective Java 67 Avoid excessive synchronization
Effective Java 68 Prefer executors and tasks to threads
Effective Java 69 Prefer concurrency utilities to wait and notify
Effective Java 70 Document thread safety
Effective Java 71 Use lazy initialization judiciously
Effective Java 72 Don't depend on the thread scheduler
Effective Java 73 Avoid thread groups
Part X Serialization
Effective Java 74 Implement Serializable judiciously
Effective Java 75 Consider using a custom serialized form
Effective Java 76 Write readObject methods defensively
Effective Java 77 For instance control, prefer enum types to readResolve
Effective Java 78 Confider serialization proxies instead of serialized instances

// Kaibo

Effective Java Index的更多相关文章

  1. Effective java笔记(二),所有对象的通用方法

    Object类的所有非final方法(equals.hashCode.toString.clone.finalize)都要遵守通用约定(general contract),否则其它依赖于这些约定的类( ...

  2. Effective Java通俗理解(下)

    Effective Java通俗理解(上) 第31条:用实例域代替序数 枚举类型有一个ordinal方法,它范围该常量的序数从0开始,不建议使用这个方法,因为这不能很好地对枚举进行维护,正确应该是利用 ...

  3. Effective Java 第三版——19. 如果使用继承则设计,并文档说明,否则不该使用

    Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...

  4. Effective Java 第三版——37. 使用EnumMap替代序数索引

    Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...

  5. Effective Java 第三版——47. 优先使用Collection而不是Stream来作为方法的返回类型

    Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...

  6. Java异常(二) 《Effective Java》中关于异常处理的几条建议

    概要 本章是从<Effective Java>摘录整理出来的关于异常处理的几条建议.内容包括:第1条: 只针对不正常的情况才使用异常第2条: 对于可恢复的条件使用被检查的异常,对于程序错误 ...

  7. 【Effective Java】阅读

    Java写了很多年,很惭愧,直到最近才读了这本经典之作<Effective Java>,按自己的理解总结下,有些可能还不够深刻 一.Creating and Destroying Obje ...

  8. Effective Java —— 消除过期的对象引用

    本文参考 本篇文章参考自<Effective Java>第三版第七条"Eliminate obsolete object references" Memory leak ...

  9. 《Effective java》-----读书笔记

    2015年进步很小,看的书也不是很多,感觉自己都要废了,2016是沉淀的一年,在这一年中要不断学习.看书,努力提升自己!预计在2016年要看12本书,主要涉及java基础.Spring研究.java并 ...

随机推荐

  1. 【C#进阶系列】12 泛型

    泛型是CLR和编程语言提供的一种特殊机制,它用于满足“算法重用”  . 可以想象一下一个只有操作的参数的数据类型不同的策略模式,完全可以用泛型来化为一个函数. 以下是它的优势: 类型安全 给泛型算法应 ...

  2. python 局部变量和全局变量 global

    当你在函数定义内声明变量的时候,它们与函数外具有相同名称的其他变量没有任何关系,即变量名称对于函数来说是 局部 的.这称为变量的 作用域 .所有变量的作用域是它们被定义的块,从它们的名称被定义的那点开 ...

  3. TestNG官方文档中文版(3)-testng.xml

    TestNG的官方文档的中文翻译版第3章,原文请见 http://testng.org/doc/documentation-main.html 3 - testng.xml 调用TestNG由几种不同 ...

  4. [翻译] Autofac 控制范围和生命周期

    原文链接:http://docs.autofac.org/en/latest/lifetime/index.html Lifetime 是指服务的实例在程序中存活多久 – 从最初的实例化到清理(dis ...

  5. 第2章 如何构建布局良好的Windows程序

    01.菜单栏(MenuStrip) 设置快捷键方式: 方式一:1.设置菜单项的Text属性为(打开(&F)), 首先必须按住alt+主菜单快捷键进入到对应的主菜单, 然后直接按F就可以打开子窗 ...

  6. 七个结构模式之代理模式(Proxy Pattern)

    定义: 给某一个对象提供一个代理或者占位符,并由代理类来控制对原对象的访问.代理对象在客户端和实际对象之间启到了中介作用,并且强调了代理类对原对象的控制作用.例如:安全代理.缓冲代理.远程代理等. 结 ...

  7. 学习angular.js的一些笔记想法(上)

    1.data-ng-app与ng-app的区别 data-ng-app是为了h5不报错 2.ng-class 不多说就来拿例子说吧 html代码 <div class='color-change ...

  8. 13个风格独特的关于页面(About Pages)设计

    如何向其他人呈现你自己和你的作品呢?关于页面的设计是非常重要的,以让你的观众更多地了解你,你的工作和你的想法.这是一个很好的方式来获得更加个性化的展示效果. 设计一个漂亮的关于页面是具有挑战性的.出于 ...

  9. 25款创新的 PSD 格式搜索框设计素材【免费下载】

    这一次,我们给大家带来的素材是25款很有吸引力的搜索框 PSD 设计,你可以免费下载使用.有时候,搜索框容易被访客忽视,因为其简单和没有吸引力的设计.如果这是你所面对的问题,那么我们会鼓励你去看看在这 ...

  10. javascript中关于数组的一些鄙视题

    一.判断一个数组中是否有相同的元素 /* * 判断数组中是否有相同的元素的代码 */ // 方案一 function isRepeat1(arrs) { if(arrs.length > 0) ...