Effective Java: programming language guide

Free Download

Authors:

Edition: 1

Series: The Java series

ISBN: 0201310058, 9780201310054

Size: 3 MB (2924416 bytes)

Pages: 272/180

File format:

Language:

Publishing Year:

Category:

Joshua Bloch0201310058, 9780201310054

“An excellent book, crammed with good advice on using the Java™ programming language and object-oriented programming in general.”—Gilad Bracha, Computational Theologist, Sun Microsystems, Inc., and co-author of The Java™ Language Specification, Second Edition
“I sure wish I had this book ten years ago. Some might think that I don’t need any Java books, but I need this one.”—James Gosling, Fellow and Vice President, Sun Microsystems, Inc., and inventor of the Java™ programming language

Are you looking for a concise book packed with insight and wisdom not found elsewhere? Need to really understand the Java programming language; that is, really understand it? Do you want to write code that is clear, correct, robust, and reusable? Look no further! The book you are holding will provide you with this and many other benefits you may not even know you were looking for. Become a more effective programmer.
Featuring fifty-seven valuable rules of thumb, Effective Java™ Programming Language Guide contains working solutions to the programming challenges most developers encounter every day. Offering comprehensive descriptions of techniques used by the experts who developed the Java platform, the book reveals what to do—and what not to do—in order to produce clear, robust, and efficient code.
Each rule appears in the form of a short, stand-alone essay offering insight, code examples, and “war stories” from this uniquely qualified author. The essays include specific advice and insights into the subtleties of the language and are illustrated with exceptional code examples. Throughout the book, common language idioms and design patterns are examined and insightful and enlightening tips and techniques are provided.
Coverage includes:
• Customary and effective language usage that is saturated with expert advice in a concise, readable, and easy-to-access format.
• Patterns, antipatterns, and idioms to help you get the most out of the Java platform.
• Commonly misunderstood subtleties of the language and its libraries: how to avoid the traps and pitfalls.
• Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.io.
• Detailed coverage of serialization, including practical advice that is not available elsewhere.
Appealing to a broad spectrum of the programming community, Effective Java™ Programming Language Guide presents the most practical, authoritative guidelines available for writing efficient, well-designed programs for the Java platform.


Table of contents :
Cover……Page 1
Table of Contents……Page 3
Foreword……Page 5
Preface……Page 7
Acknowledgments……Page 8
1. Introduction……Page 9
Item 1: Consider providing static factory methods instead of constructors……Page 12
Item 2: Enforce the singleton property with a private constructor……Page 15
Item 4: Avoid creating duplicate objects……Page 17
Item 5: Eliminate obsolete object references……Page 20
Item 6: Avoid finalizers……Page 23
Item 7: Obey the general contract when overriding equals……Page 27
Item 8: Always override hashCode when you override equals……Page 35
Item 9: Always override toString……Page 39
Item 10: Override clone judiciously……Page 41
Item 11: Consider implementing Comparable……Page 48
Item 12: Minimize the accessibility of classes and members……Page 52
Item 13: Favor immutability……Page 54
Item 14: Favor composition over inheritance……Page 61
Item 15: Design and document for inheritance or else prohibit it……Page 65
Item 16: Prefer interfaces to abstract classes……Page 69
Item 17: Use interfaces only to define types……Page 73
Item 18: Favor static member classes over nonstatic……Page 75
Item 19: Replace structures with classes……Page 79
Item 20: Replace unions with class hierarchies……Page 80
Item 21: Replace enum constructs with classes……Page 84
Item 22: Replace function pointers with classes and interfaces……Page 92
Item 23: Check parameters for validity……Page 95
Item 24: Make defensive copies when needed……Page 97
Item 25: Design method signatures carefully……Page 100
Item 26: Use overloading judiciously……Page 101
Item 27: Return zero-length arrays, not nulls……Page 105
Item 28: Write doc comments for all exposed API elements……Page 107
Item 29: Minimize the scope of local variables……Page 111
Item 30: Know and use the libraries……Page 113
Item 31: Avoid float and double if exact answers are required……Page 116
Item 32: Avoid strings where other types are more appropriate……Page 118
Item 33: Beware the performance of string concatenation……Page 120
Item 34: Refer to objects by their interfaces……Page 121
Item 35: Prefer interfaces to reflection……Page 122
Item 36: Use native methods judiciously……Page 125
Item 37: Optimize judiciously……Page 126
Item 38: Adhere to generally accepted naming conventions……Page 128
Item 39:Use exceptions only for exceptional conditions……Page 131
Item 40:Use checked exceptions for recoverable conditions and run-time exceptions for programming errors……Page 133
Item 41:Avoid unnecessary use of checked exceptions……Page 134
Item 42:Favor the use of standard exceptions……Page 136
Item 43: Throw exceptions appropriate to the abstraction……Page 137
Item 44:Document all exceptions thrown by each method……Page 139
Item 45:Include failure-capture information in detail messages……Page 140
Item 46:Strive for

Reviews

There are no reviews yet.

Be the first to review “Effective Java: programming language guide”
Shopping Cart
Scroll to Top