Part 1 of 6 · 1 min read
Why this page comes third
In this module you will
- Explain the telescoping constructor problem and the JavaBeans problem.
- Write a Java builder for an immutable class, with checks in
build. - Say when a builder is worth its extra code.
- Describe the original GoF Builder with a director and how it differs.
- Use a builder in an interview answer about a request or configuration object.
Module 1 of Level 3 made objects with a name or a code. Many classes have a long list of fields, most of them optional, and a constructor cannot express that cleanly. The sources are "Effective Java" (EJ) Item 2 and "Design Patterns" (GoF) chapter 3. Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.