A design pattern is a well-proved solution for solving the specific problem/task.
For example, to create a class for which only a single instance should be created and that single object can be used by all other classes, use Singleton design pattern.
Design patterns are programming language independent, it is for solving the common object-oriented design problems.
A design pattern represents an idea, not an implementation.
By using the design patterns we can make our code more flexible, reusable and maintainable.
Java itself internally follows design patterns.
In core java, there are mainly three types of design patterns, which are further divided into their sub-parts:
Creational design patterns are used when creating objects.
In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software.
These authors are collectively known as Gang of Four (GOF).
Design patterns are based on the following principles of object orientated design.
Program to an interface not an implementation
Favor object composition over inheritance