Use Builders

Use a builder for breaking down constructor parameters, or as a closure of a constructor.

Java does not support methods as a first-class citizen. So if you want to pass a constructor to another method, you need a builder.

Creative Commons License
This blog by Che-Liang Chiou is licensed under a Creative Commons Attribution 4.0 International License.