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
Is class is a data type?
Why is multiple inheritance not supported in java?
Can we cast any other type to boolean type with type casting?
Is java a compiler?
What is a for loop in java?
Can a constructor be made final?
What type of variable is gender?
Why main function is static?
can rmi and corba based applications interact ?
Why main method is static in java?
What is parameter example?
Is int a class in java?
What about main thread in java?
What are the new features in java 8?
What is difference between iterator and enumeration in java?