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

Is class is a data type?

566


Why is multiple inheritance not supported in java?

555


Can we cast any other type to boolean type with type casting?

533


Is java a compiler?

563


What is a for loop in java?

587






Can a constructor be made final?

655


What type of variable is gender?

537


Why main function is static?

663


can rmi and corba based applications interact ?

656


Why main method is static in java?

585


What is parameter example?

535


Is int a class in java?

520


What about main thread in java?

640


What are the new features in java 8?

559


What is difference between iterator and enumeration in java?

520