0 votes
in Design Patterns by (13.0k points)
What is Singleton design pattern in Java ?

1 Answer

0 votes
by (23.1k points)
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

0 votes
asked Oct 17, 2019 in Design Patterns by Robin (13.0k points)
0 votes
asked Oct 16, 2019 in Design Patterns by DavidAnderson (7.4k points)
0 votes
asked Jan 27, 2020 in JAVA by rahuljain1 (6.0k points)