基本信息 书名:Effective Java 定价:39元 作者:(美)布洛克 著 出版社:人民邮电出版社 出版日期:2009-09-01 ISBN:9787115211316 字数:498000 页码:346 版次:1 装帧:平装 开本:16开 商品重量: 编辑推荐 如果您正在寻找一本能够帮助您深入了解和掌握Java的经典图书,不用找了!本书为您提供了78条程序员必知的黄金法则。这些法则针对您每天都要遇到的编程问题,提出、实用的解决方案,帮助您编写出更清晰、更准确、更实用且易于重用的代码。 本书是Jolt获奖图书《Effective Java》的版本,涵盖了版之后出现的Java SE5和JavaSE6的新特性,同时介绍了新的设计模式和语言习惯用法,以及如何充分利用从泛型到枚举、从注解到自动装箱的各种特性。 书中的每一章节都简洁明了、各自独立。作者针对Java平台的精妙之处提出了具体的使用建议和独到的见解,并提供了的代码范例。 本书的主要内容有: 全新的泛型、枚举、注解、自动装箱、for—each循环、可变参数和并发机制等; 经典主题的全新技术和佳实践,包括对象、类、类库、方法和序列化; 如何避免如陷阱和缺陷之类常被误解的细微知识; Java语言本身和基本的类库及其扩展。 内容提要 本书介绍了在Java编程中78条经典的、实用性极高的经验规则,这些经验规则可以帮助开发人员来解决每天都有可能面对的大多数问题。书中对Java平台设计专家所使用的技术的介绍,揭示了如何事半功倍地的编写清晰、健壮和高效的代码。本是经典图书Effective Java的第2版,涵盖了Java 5中的重要变化,并删除了一些时的内容。本书所介绍的每条规则,都以简明易懂的语言来阐释,并通过示例代码进一步加以说明。 本书内容翔实,层次分明,是一本可以帮助技术人员更深层次理解Java的参考用书。 目录 1 Introduction2 Creating and Destroying Objects Item 1: Consider static factory methods instead of constructors Item 2: Consider a builder when faced with many constructor parameters Item 3: Enforce the singleton property with a private constructor or an enum type Item 4: Enforce noninstantiability with a private constructor Item 5: Avoid creating unnecessary objects Item 6: Eliminate obsolete object references Item 7: Avoid finalizers3 Methods Common to All Objects Item 8: Obey the general contract when overriding equa]s Item 9: Always override hashGode when you override equals Item 10: Always override toString Item 11: Override clone judiciously Item 12: Consider implementing Comparab]e4 Classes and Interfaces Item 13: Minimize the accessibility of classes and members Item 14: In public classes, use accessor methods, not public fields Item 15: Minimize mutability Item 16: Favor composition over inheritance Item 17: Design and document for inheritance or else prohibit it . Item 18: Prefer interfaces to abstract classes Item 19: Use interfaces only to define types, Item 20: Prefer class hierarchies to tagged classes Item 21: Use function objects to represent strategies Item 22: Favor static member classes over nonstatic5 Generics Item 23: Don't use raw types in new code Item 24: Eliminate unchecked warnings Item 25: Prefer lists to arrays Item 26: Favor generic types Item 27: Favor generic methods Item 28: Use bounded wildcards to increase API flebility Item 29: Consider typesafe heterogeneous containers6 Enums and Annotations Item 30: Use enums instead of int constants Item 31: use instance fields instead of ordinals Item 32: Use EnuraSet: instead of bit fields Item 33: Use EnumMap instead of ordinal indeng Item 34: Emulate extensible enums with interfaces Item 35: Prefer annotations to naming patterns Item 36: Consistently use the 0ve r ride annotation Item 37: Use marker interfaces to define types7 Methods Item 38: Check parameters for validity Item 39: Make defensivecopies when needed Item 40: Design method signatures carefully Item 41: Use overloading judiciously8 General Programming9 Exceptions10 Concurrency11 SerializationAppendix: Items Corresponding to First EditionReferencesIndex 作者介绍 Joshua Bloch是Google公司的首席Java构架师,也是Jolt图书大奖的获得者。他曾是Sun公司的杰出工程师和Transarc公司的高级系统设计师。Bloch带领着他的团队,设计和实现过无数的Java平台特性。包括K5.0语言增强版和获奖的Java Collections Framework。 序言
以下为对购买帮助不大的评价