: Make classes and members as private as possible.
: Pass resources to the constructor instead of hardcoding them (Singleton/Static utilities). 2. Methods Common to All Objects
: Don't use them for normal control flow. : Make classes and members as private as possible
: Interfaces allow for flexible, "mixin" type behavior. 4. Generics and Enums
: They have names and aren't required to create a new object every time. : Make classes and members as private as possible
: Always provide a useful implementation to make debugging easier.
: Throw exceptions early (at the start of the method). : Make classes and members as private as possible
: Use this when constructors have many parameters (especially optional ones).