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


Please Help Members By Posting Answers For Below Questions

What are java packages? What's the significance of packages?

840


Does java allow default arguments?

767


What is not object oriented programming?

685


What is ternary operator in java?

801


explain the concept of virtual method invocation in polymorphism in detail?

1921


What is skeleton and stub? What is the purpose of those?

764


What is a consumer in java?

764


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

771


What are the access modifiers in java?

771


Give an example of use of pointers in java class.

746


what is enumset?

780


How can you write a loop indefinitely in java programming?

747


What is the transient keyword?

1231


How do you check if a string is lexicographically in java?

704


What is map in java?

718