What is singleton? What is the purpose of singleton? How to get connection in websphere portal server?

Questions by nareshKumarwps

Showing Answers 1 - 0 of 0 Answers

Singleton class is a class in which only one instance of the object exist at any point of time. So a Singleton class is basically used when we want to restrict instantiation of a class to only one object. "Application" class, print spooler, database connection are examples of a singleton class. In a singleton class the constructor is made private and a private static is declared that reference of same class. A static variable is used for instantiating the class. Singleton class are not cloneable.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions