Book description
A new edition of this title is available, ISBN-10: 0321356683 ISBN-13: 9780321356680
Table of contents
- Copyright
- Foreword
- Preface
- Acknowledgments
- 1. Introduction
-
2. Creating and Destroying Objects
- Item 1: Consider providing static factory methods instead of constructors
- Item 2: Enforce the singleton property with a private constructor
- Item 3: Enforce noninstantiability with a private constructor
- Item 4: Avoid creating duplicate objects
- Item 5: Eliminate obsolete object references
- Item 6: Avoid finalizers
- 3. Methods Common to All Objects
-
4. Classes and Interfaces
- Item 12: Minimize the accessibility of classes and members
- Item 13: Favor immutability
- Item 14: Favor composition over inheritance
- Item 15: Design and document for inheritance or else prohibit it
- Item 16: Prefer interfaces to abstract classes
- Item 17: Use interfaces only to define types
- Item 18: Favor static member classes over nonstatic
- 5. Substitutes for C Constructs
- 6. Methods
-
7. General Programming
- Item 29: Minimize the scope of local variables
- Item 30: Know and use the libraries
- Item 31: Avoid float and double if exact answers are required
- Item 32: Avoid strings where other types are more appropriate
- Item 33: Beware the performance of string concatenation
- Item 34: Refer to objects by their interfaces
- Item 35: Prefer interfaces to reflection
- Item 36: Use native methods judiciously
- Item 37: Optimize judiciously
- Item 38: Adhere to generally accepted naming conventions
-
8. Exceptions
- Item 39:Use exceptions only for exceptional conditions
- Item 40:Use checked exceptions for recoverable conditions and run-time exceptions for programming errors
- Item 41:Avoid unnecessary use of checked exceptions
- Item 42:Favor the use of standard exceptions
- Item 43: Throw exceptions appropriate to the abstraction
- Item 44:Document all exceptions thrown by each method
- Item 45:Include failure-capture information in detail messages
- Item 46:Strive for failure atomicity
- Item 47:Don't ignore exceptions
- 9. Threads
- 10. Serialization
- References
Product information
- Title: Effective Java™: Programming Language Guide
- Author(s):
- Release date: June 2001
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780201310054
You might also like
book
THE Java™ Programming Language, Fourth Edition
Direct from the creators of the Java™ programming language, the completely revised fourth edition of is …
book
Programming Languages: Concepts and Implementation
Programming Languages: Concepts and Implementation teaches language concepts from two complementary perspectives: implementation and paradigms. It …
book
C++ System Programming Cookbook
A problem-solution-based guide to help you overcome hurdles effectively while working with kernel APIs, filesystems, networks, …
book
Discovering Modern C++, 2nd Edition
Write Powerful, Modern C++ Code for Scientific, Engineering, and Embedded Applications Discovering Modern C++, Second Edition, …