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#操作 word代码

    #region 读取word /// <summary> /// 读取word所有文字内容(不包含表格) /// </summary> /// <returns>w ...

  2. 【C#】第3章补充(一)如何在WPF中绘制正弦曲线

    分类:C#.VS2015 创建日期:2016-06-19 使用教材:(十二五国家级规划教材)<C#程序设计及应用教程>(第3版) 一.要点 本例子提前使用了教材第13章介绍的基本知识. 二 ...

  3. MVC之前的那点事儿系列(7):WebActivator的实现原理详解

    文章内容 上篇文章,我们分析如何动态注册HttpModule的实现,本篇我们来分析一下通过上篇代码原理实现的WebActivator类库,WebActivator提供了3种功能,允许我们分别在Http ...

  4. EC笔记,第一部分:1.视C++为一个语言联邦

    C++可看作由以下四种次语言组合而成1.C语言    高效,内置数据类型,数组,区块,语句,指针,预处理器,没有重载.异常.模板2.类    构造,析构,封装,继承,多态,迟绑定3.模板    模板元 ...

  5. Apache+Mod_Python配置

    我其实不是个适合做编程的人,因为喜欢折腾,不喜欢日复一日的重复同样的事情.感觉挺适合做网管(运维)的. 经常在摆弄一些小众的程序员不怎么会关心的东西,不走寻常路.有时也挺纠结的,折腾这些东西的过程中, ...

  6. 面试问题整理笔记系列 一 Java容器类

                                               虚线框表示接口:实线框表示实体类:粗线框表示最常用的实体类:虚线箭头表示实现了这个接口:实现箭头表示类可以制造箭头 ...

  7. mysql memory表性能测试以及使用场景

    最近公司计划将风控逻辑移到slave库进行计算,因为考虑到业务表数据会比较大,此时如果还是走nest-loop的话,即使unique进行连接,因为还是需要至少2次以上LIO才能读一条记录,如果达到类似 ...

  8. servlet的开发流程介绍

    servlet的开发部署流程 1.在%TOMCAT_HOME%/webapps下WEB-INF的文件夹,写一个文件web.xml(该网站的配置信息),建立一个classes的子文件夹,也可以从别的目录 ...

  9. windows中安装node.js和测试

    首先下载node.js安装包:下载页面:http://down.keleyi.com/goto/node.js.htm 选择windows msi安装包,根据自己操作系统选择32位或者64位安装包.然 ...

  10. [原创]html5游戏_贪吃蛇

    代码随便写写,尚有许多不足,PC与手机端皆可运行 手机端滑屏操作,PC端方向键操作 疑问: 生成食物,与判断是否可以移动方面 有两种实现方式, 1.使用js内存,数组循环判断 2.使用dom的quer ...