Quality above quantity.
Subscribe to my newsletter and never miss my upcoming articles
In Java8, some of the things that are added:
lambdas, functional interface, method references -> create function objects
streams -> processing sequence of data elements
Item 42: Prefer lambdas to anonymous class
Item 43: Prefer method re...
Two special purpose families of reference types: Enums and Annotations.
Item 34: Use enums instead of int constants
Item 35: Use instance fields instead of ordinals
Item 36: Use EnumSet instead of bit fields
Item 37: Use EnumMap instead o...
Generics has been present since Java 5. They help in maintaining static typing by inserting casts and give error at compile time if inconsistent. They however comes at a price and the chapter aims to assist in using them efficiently.
Item 15: Minimize the accessibility of classes and members
Item 16: In public classes, use accessor methods, not public fields
Item 17: Minimize mutability
Item 18: Favour composition over inheritance
Item 19: Design and document for inher...
Object is a concrete class, designed primarily for extension. This article would tell you when and how to override the methods.
Item 10: Obey the general contract when overriding equals
Item 11: Always override hashCode when you override e...
Part of a Series
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