Where is singleton design pattern used in java?
Answer / Ishan Bhatnagar
The Singleton design pattern is typically used in Java when exactly one instance of a class is needed throughout the entire application. This can be achieved by making the constructor private and providing a public static method to access the single instance.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the content of the Java 2 security policy file?
when Can an object reference be cast to an interface reference?
Do I really have to type in the programs in the book to try them out?
Can an application have multiple classes having main method?
What is a jvm?
What is the difference between the boolean & operator and the && operator?
What is custom tag in java?
What is a jpa repository?
What is meant by swing in java?
What is jndi datasource in java?
differences between iterator and spliterator in java se 8?
Explain the reason for each keyword of public static void main(string args[])?