文档介绍:Effective Java: Programming Language Guide
Joshua Bloch
Publisher: Addison Wesley
First Edition June 01, 2001
ISBN: 0-201-31005-8, 272 pages
Are you ready for a concise book packed with insight and wisdom not found elsewhere? Do
you want to gain a deeper understanding of the Java programming language? Do you want to
write code that is clear, correct, robust, and reusable? Look no further! This book will provide
you with these and many other benefits you may not even know you were looking for.
Featuring fifty-seven valuable rules of thumb, Effective Java Programming Language Guide
contains working solutions to the programming challenges most developers encounter each
day. prehensive descriptions of techniques used by the experts who developed
the Java platform, this book reveals what to do - and what not to do - in order to produce
clear, robust and efficient code.
Table of Contents
Foreword............................................................................................................................... 1
Preface................................................................................................................................... 3
Acknowledgments.................................................................................................................4
Chapter 1. Introduction....................................................................................................... 5
Chapter 2. Creating and Destroying Objects .................................................................... 8
Item 1: Consider providing static factory methods instead of constructors....................... 8
Item 2: Enforce the singleton property with a private constructor................................... 11
Item 3: Enforce noninstantiability with a private constructor.......................................... 13
Item 4: Avoid creating duplicate objects.................................