Categories

Oct 17, 2019 in Design Patterns

Q: What is Singleton design pattern in Java ?

1 Answer

Oct 17, 2019
Singleton pattern focus on sharing of expensive object in whole system. Only one instance of a particular class is maintained in whole application which is shared by all modules. Java.lang.Runtime is a classical example of Singleton design pattern. You can also see my post 10 questions on Singleton pattern in Java for more questions and discussion. From Java 5 onwards you can use enum to thread-safe singleton.
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Oct 17, 2019 in Design Patterns
Oct 16, 2019 in Design Patterns
Oct 17, 2019 in Design Patterns
...