Effective Java: Programming Language Guide
Designed to help Java programmers make the most effective use of the Java programming language and its fundamental libraries, this updated edition includes more than 50 essays, each of which conveys one rule. Helping programmers sidestep common misconceptions and errors, each rule captures best practices that have been tested in the real world. Just one of the key features in this book are the code examples that illustrate many useful design patterns and idoms. Another key feature is the advice on what not to do. Providing examples of what practices to avoid helps programmers side step common misconceptions and errors. While the second edition will cover all of the classic topics developers have come to rely on- objects, classes, libraries, methods, and serialization; new to this edition will be the coverage on generics, metadata, autoboxing, concurrency utilities, memory model, enumerations, and more. The book is based on the philosophy that clarity and simplicity are of paramount importance. The concise essays teach Java programmers of all levels how to write correct, clear, reusable, and effective code. Learning the art of Java programming, like most other disciples, consists of learning the rules and then learning when to violate them. With this book in hand, Java programmers will truly learn the rules and then learn when to violate them.
What people are saying - Write a review
We haven't found any reviews in the usual places.
Creating and Destroying Objects
Enforce the singleton property with a private constructor
58 other sections not shown
Other editions - View all
abstract class accessors anonymous class appropriate array behavior BigInteger bucket array client clone method Cloneable compareTo method constant constructor contains create declaration default serialized form defensive copying deserialized designed for inheritance discriminated union documentation element ensure enumerated type equals method example guarantee hash code hash function hashCode Hashtable idiom immutable classes immutable objects implements Serializable initialized interface invariants invoked ISBN Iterator Java platform Java platform libraries Java programming language java.util Javadoc JVM implementations lazy initialization loop method invocation modified mutable objects nested class null object reference Operation overloading overridable methods package package-private parameters performance PhoneNumber private final private static problem public class public int public static final readObject method readResolve method Remainder omitted result reuse Serializable skeletal implementation Specification static factory method static member class String subclass superclass synchronized thread thread safety throw tion unchecked exceptions variable violate write