图书介绍

effectivejava影印版PDF|Epub|txt|kindle电子书版本网盘下载

effectivejava影印版
  • 出版社:
  • ISBN:
  • 出版时间:未知
  • 标注页数:0页
  • 文件大小:31MB
  • 文件页数:267页
  • 主题词:

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

effectivejava影印版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

1 Introduction1

2 Creating and Destroying Objects5

Item 1: Consider providing static factory methods instead of constructors5

Item 2: Enforce the singleton property with a private constructor10

Item 3: Enforce noninstantiability with a private constructor12

Item 4: Avoid creating duplicate objects13

Item 5: Eliminate obsolete object references17

Item 6: Avoid finalizers20

3 Methods Common to All Objects25

Item 7: Obey the general contract when overriding equals25

Item 8: Always override hashCode when you override equals36

Item 9: Always override to String42

Item 10: Override clone judiciously45

Item 11: Consider implementing Comparable53

4 Classes and Interfaces59

Item 12: Minimize the accessibility of classes and members59

Item 13: Favor immutability63

Item 14: Favor composition over inheritance71

Item 15: Design and document for inheritance or else prohibit it78

Item 16: Prefer interfaces to abstract classes84

Item 17: Use interfaces only to define types89

Item 18: Favor static member classes over nonstatic91

5 Substitutes for C Constructs97

Item 19: Replace structures with classes97

Item 20: Replace unions with class hierarchies100

Item 21: Replace enum constructs with classes104

Item 22: Replace function pointers with classes and interfaces115

6 Methods119

Item 23: Check parameters for validity119

Item 24: Make defensive copies when needed122

Item 25: Design method signatures carefully126

Item 26: Use overloading judiciously128

Item 27: Return zero-length arrays, not nulls134

Item 28: Write doc comments for all exposed API elements136

7 General Programming141

Item 29: Minimize the scope of local variables141

Item 30: Know and use the libraries145

Item 31: Avoid float and double if exact answers are required149

Item 32: Avoid strings where other types are more appropriate152

Item 33: Beware the performance of string concatenation155

Item 34: Refer to objects by their interfaces156

Item 35: Prefer interfaces to reflection158

Item 36: Use native methods judiciously161

Item 37: Optimize judiciously162

Item 38: Adhere to generally accepted naming conventions165

8 Exceptions169

Item 39: Use exceptions only for exceptional conditions169

Item 40: Use checked exceptions for recoverable conditions and run-time exceptions for programming errors172

Item 41: Avoid unnecessary use of checked exceptions174

Item 42: Favor the use of standard exceptions176

Item 43: Throw exceptions appropriate to the abstraction178

Item 44: Document all exceptions thrown by each method181

Item 45: Include failure-capture information in detail messages183

Item 46: Strive for failure atomicity185

Item 47: Don't ignore exceptions187

9 Threads189

Item 48: Synchronize access to shared mutable data189

Item 49: Avoid excessive synchronization196

Item 50: Never invoke wait outside a loop201

Item 51: Don't depend on the thread scheduler204

Item 52: Document thread safety208

Item 53: Avoid thread groups211

10 Serialization213

Item 54: Implement Seriali zable judiciously213

Item 55: Consider using a custom serialized form218

Item 56: Write readobj ect methods defensively224

Item 57: Provide a readResol ve method when necessary230

References233

Index of Patterns and Idioms239

Index241

热门推荐