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 the primitive type byte?

569


What is method in java ?

618


Which category the java thread do fall in?

563


How many types of constructors are used in java?

532


What is the differences between c++ and java? Explain

580






Does the order of public and static declaration matter in main method?

609


What are local variables?

587


What is the difference between processes and threads?

529


What is the inheritance?

544


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

617


What is the main use of java?

567


Is empty set an element of empty set?

595


Explain the importance of finalize() method.

559


How do you create a bulleted list?

557


What is Java Package and which package is imported by default?

589