Creational patterns
The creational pattern is the pattern to be followed for the creation of code.
It pertains to how you create an object, by making use of the existing code and by creating an instance of the existing code. It's basically reusing code by creating objects instead of repeating code.
Using a creational pattern, objects may be created making use of the existing code by following some standard patterns.
Builder
The builder pattern separates the construction of a complex object from its representation.
This means that creating a construction makes use of a builder to build the structure. This builder could be customized to create different representations of the same construction.
Consider the following piece of code to show an alert dialog in Android:
AlertDialog.Builder builder = new AlertDialog.Builder(this) .setTitle("Dialog Title") .setMessage("Description for the dialog.") .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { ...