How many objects are created for a singleton class
Answer Posted / rajani nagandla
The Singleton is a useful Design Pattern for allowing only
one instance of your class.The Singleton's purpose is to
control object creation, limiting the number to one but
allowing the flexibility to create more objects if the
situation changes. Since there is only one Singleton
instance, any instance fields of a Singleton will occur
only once per class, just like static fields.
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is a void in java?
Explain the difference between association, aggregation and inheritance relationships.
What is a vector in java?
What is boolean data type in java?
What is a void method java?
Can we override constructor?
What do you mean by static variable?
Explain list interface?
What is the difference between && and & in java?
What is Session reduplication and how its done?
What is the role of garbage collector in java?
What are the differences between abstract class and interface?
How to connect to a remote database using Applet?
What is the use of runnable interface?
What is numel matlab?