Resources :
https://refactoring.guru/design-patterns/
https://howtodoinjava.com/design-patterns/
Design Patterns : Design patterns represent the best practices used by experienced object-oriented software developers. Design patterns are solutions to general problems that software developers faced during software development. These solutions were obtained by trial and error by numerous software developers over quite a substantial period of time.
-
Creational : Creational patterns provide various object creation mechanisms, which increase flexibility and reuse of existing code.
- Singleton : is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance. is a design solution where an application wants to have one and only one instance of any class
- Prototype : is a creational design pattern that lets you copy existing objects without making it dependent on their classes.
- Factory
- Abstrac Factory
- Builder
-
Structural :
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
-
Behavioral :
- Chain Of Responsibility
- Command
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
volaitle : Volatile keyword is used to modify the value of a variable by different threads. It is also used to make classes thread safe, The volatile keyword does not cache the value of the variable and always read the variable from the main memory. The volatile keyword cannot be used with classes or methods. When a variable is not shared between multiple threads, you do not need to use the volatile keyword with that variable (https://www.javatpoint.com/volatile-keyword-in-java)