O'Reilly logo

Design Patterns in Java™, Second Edition by William C. Wake, Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14 Introducing Construction

WHEN YOU CREATE a Java class, you normally provide for the creation of objects of your class by supplying class constructors. Constructors are useful, though, only if clients know which class to construct and have values for the parameters that a constructor requires. Several design patterns address cases in which these conditions or other circumstances of ordinary construction do not hold. Before examining designs for cases in which ordinary construction is insufficient, it is useful to review ordinary construction in Java.

A Few Construction Challenges

Constructors are special methods. In many respects, including access modifiers, overloading, and the syntax of parameter lists, constructors are like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required