Builder pattern is used to construct a complex object step and the process of construction should be generic. Difference between abstract factory and builder. Sample builder in JAVA API. Sample Java Source Code