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


Please Help Members By Posting Answers For Below Questions

What is a void in java?

570


Explain the difference between association, aggregation and inheritance relationships.

545


What is a vector in java?

568


What is boolean data type in java?

557


What is a void method java?

506






Can we override constructor?

527


What do you mean by static variable?

562


Explain list interface?

509


What is the difference between && and & in java?

559


What is Session reduplication and how its done?

1558


What is the role of garbage collector in java?

483


What are the differences between abstract class and interface?

501


How to connect to a remote database using Applet?

2036


What is the use of runnable interface?

599


What is numel matlab?

638