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的更多相关文章
-
Effective java笔记(二),所有对象的通用方法
Object类的所有非final方法(equals.hashCode.toString.clone.finalize)都要遵守通用约定(general contract),否则其它依赖于这些约定的类( ...
-
Effective Java通俗理解(下)
Effective Java通俗理解(上) 第31条:用实例域代替序数 枚举类型有一个ordinal方法,它范围该常量的序数从0开始,不建议使用这个方法,因为这不能很好地对枚举进行维护,正确应该是利用 ...
-
Effective Java 第三版——19. 如果使用继承则设计,并文档说明,否则不该使用
Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...
-
Effective Java 第三版——37. 使用EnumMap替代序数索引
Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...
-
Effective Java 第三版——47. 优先使用Collection而不是Stream来作为方法的返回类型
Tips <Effective Java, Third Edition>一书英文版已经出版,这本书的第二版想必很多人都读过,号称Java四大名著之一,不过第二版2009年出版,到现在已经将 ...
-
Java异常(二) 《Effective Java》中关于异常处理的几条建议
概要 本章是从<Effective Java>摘录整理出来的关于异常处理的几条建议.内容包括:第1条: 只针对不正常的情况才使用异常第2条: 对于可恢复的条件使用被检查的异常,对于程序错误 ...
-
【Effective Java】阅读
Java写了很多年,很惭愧,直到最近才读了这本经典之作<Effective Java>,按自己的理解总结下,有些可能还不够深刻 一.Creating and Destroying Obje ...
-
《Effective java》-----读书笔记
2015年进步很小,看的书也不是很多,感觉自己都要废了,2016是沉淀的一年,在这一年中要不断学习.看书,努力提升自己!预计在2016年要看12本书,主要涉及java基础.Spring研究.java并 ...
-
《Effective Java》学习笔记——积累和激励
从一个实际案例说起 国庆长假前一个礼拜,老大给我分配了这么一个bug,就是打印出来的报表数量为整数的,有的带小数位,有的不带,毫无规律. 根据短短的两个多月的工作经验以及猜测,最终把范围缩小到以下这段 ...
随机推荐
-
delphi如何让程序最小化到任务栏(转)
现在很多的应用程序都有这样一种功能,当用户选择最小化窗口时,窗口不是象平常那样最小化到任务栏上,而是“最小化”成一个任务栏图标.象FoxMail 3.0 NetVampire 3.0等都提供了这样的功 ...
-
MyEclipse 2015 CI
系统 win8.1 MyEclipse 2015 CI 激活后可用 激活工具 地址:http://download.csdn.net/detail/trep10000/8305577
-
Content-type 对照表
Content-Type,内容类型,一般是指网页中存在的Content-Type,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式.什么编码读取这个文件,比如用PHP输出图片文件.JSON数 ...
-
iOS性能优化中的离屏渲染
GPU屏幕渲染有以下两种方式: On-Screen Rendering意为当前屏幕渲染,指的是GPU的渲染操作是在当前用于显示的屏幕缓冲区中进行. Off-Screen Rendering意为离屏渲染 ...
-
如何用visual studio控件(repeater)绑定数据库(SQL server)信息并显示
今天学习了下如何间接绑定数据库网上看了很多信息,都云里雾里,没有图片说明,初学者完全看不懂,我自己做了一个DEMO,相信可以帮到大家! 一.建立数据库,并构建表信息,我的表信息如下: 表中的数据在数据 ...
-
Windows 7如何建立一个FTP的快捷方式
原来,使用Windows XP的时候,在IE6的地址栏里输入FTP服务器的地址,就可以打开一个资源管理器的界面来管理文件.但是,随着IE的版本的提升或是装了Windows 7,原来的这种方法就不能用了 ...
-
C#第七天
一 1.继承:我们可能会在一些类中,写一些重要的成员,将这些重复的成员单独的封装到一个类中,作为这些类的父类. Student Teacher Driver ...
-
你不知道的JavaScript--Item17 循环与prototype最后的几点小tips
1.优先使用数组而不是Object类型来表示有顺序的集合 ECMAScript标准并没有规定对JavaScript的Object类型中的属性的存储顺序. 但是在使用for..in循环对Object中的 ...
-
转 node.js和 android中java加密解密一致性问题;
原文地址,请大家去原文博客了解; http://blog.csdn.net/linminqin/article/details/19972751 我保留一份,防止删除: var crypto = re ...
-
Julia 下载 安装 juno 开发环境搭建
Windows平台 Julia 的官网 (https://julialang.org) 下载链接(https://julialang.org/downloads) 下载完成后,如果想安装在 C 盘,则 ...