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
What are java packages? What's the significance of packages?
Does java allow default arguments?
What is not object oriented programming?
What is ternary operator in java?
explain the concept of virtual method invocation in polymorphism in detail?
What is skeleton and stub? What is the purpose of those?
What is a consumer in java?
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
What are the access modifiers in java?
Give an example of use of pointers in java class.
what is enumset?
How can you write a loop indefinitely in java programming?
What is the transient keyword?
How do you check if a string is lexicographically in java?
What is map in java?