Builder Pattern
The Builder pattern is a creational design pattern that separates the construction of a complex object from its representation, using a step-by-step builder object to assemble the final object and often exposing a fluent, chainable API.
12 resources across 4 libraries
Glossary Terms(4)
Singleton Pattern
The Singleton pattern is a creational design pattern that restricts a class to a single instance and provides a global point of access to that instance.
Factory Pattern
The Factory pattern is a creational design pattern that delegates object creation to a dedicated method or class, so calling code can obtain new instances with…
Builder Pattern
The Builder pattern is a creational design pattern that separates the construction of a complex object from its representation, using a step-by-step builder ob…
Immutability
Immutability is a property of a data value or object that cannot be modified after it is created; instead of changing an immutable value in place, operations p…
Study Notes(1)
Cheat Sheets(1)
Interview Questions(6)
What is the Builder Pattern?
The Builder pattern is a creational design pattern that separates the step-by-step construction of a complex object from its final representation, letting the…
What is a Static Class?
A static class is a nested class declared with the static modifier that does not hold an implicit reference to an instance of its enclosing outer class, so it…
What is a Fluent Interface in OOP?
A fluent interface is an API design style in which methods return the object itself (typically 'this'), allowing consecutive calls to be chained together into…
Factory Pattern vs Builder Pattern
The Factory pattern encapsulates object creation behind a single method call that returns a fully-formed object of a chosen type, while the Builder pattern con…
What is the Telescoping Constructor Anti-Pattern?
The telescoping constructor anti-pattern is a design flaw where a class exposes an ever-growing chain of overloaded constructors, each adding one more paramete…
Builder Pattern vs Telescoping Constructor
The builder pattern replaces a telescoping chain of overloaded constructors with a separate builder object that sets each field by name through chained method…