SE450: Looking Back: Creating instances [6/24] Previous pageContentsNext page

Static Factory: a static class whose purpose is to generate instances of an interface (or interfaces). The interface and factory are public, but the implementing classes are not.

Builder: A mutable object used to build an immutable object. Add pieces to the builder gradually, then convert to its immutable representation (eg, StringBuilder).

Previous pageContentsNext page