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
How long will it take to learn java?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
explain copyonwritearraylist and when do we use copyonwritearraylist?
What is thread synchronization in java?
What defines function?
What are internal and external variables?
What is anti pattern in java?
Can we have this () and super () together?
What is finalize()? Is finalize() similar to a destructor?
What is this keyword in java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
What are the different conditional statements?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What does this mean java?
What is a line break example?