Where is singleton design pattern used in java?



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

Post New Answer

More Java Related AllOther Interview Questions

What is the content of the Java 2 security policy file?

1 Answers  


when Can an object reference be cast to an interface reference?

1 Answers  


Do I really have to type in the programs in the book to try them out?

1 Answers  


Can an application have multiple classes having main method?

1 Answers  


What is a jvm?

1 Answers  


What is the difference between the boolean & operator and the && operator?

1 Answers  


What is custom tag in java?

1 Answers  


What is a jpa repository?

1 Answers  


What is meant by swing in java?

1 Answers  


What is jndi datasource in java?

1 Answers  


differences between iterator and spliterator in java se 8?

1 Answers  


Explain the reason for each keyword of public static void main(string args[])?

1 Answers  


Categories