How many objects are created for a singleton class
Answer Posted / sivadasan
Singleton class allows to create only one instance of the
class. But the other objects can inherit from it. Singleton
is a Design Pattern to restrict create more than one
instance of a class.
And
1. It ensures only one object created for a class
2. Provides global point of access.
Mostly it is used to create DB connections.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Why does my function print none?
What is string and its types?
Can we declare a static variable inside a method?
Why is static used?
What is the difference between a constructor and a method?
What are the types of collections in java?
What is the same as procedures?
enlist some features of jdk.
Does java arraylist maintain insertion order?
What is the role of the java.rmi.naming class?
Explain static nested classes ?
How to reverse a string in java?
What is application system?
Why does java have two ways to create child threads?
How do you empty a list in java?