Answer to Question #53181 in Java | JSP | JSF for santosh
2.What is singleton class?
2) Singleton is a class that encapsulates mechanism of instance creating. It allows to have a single instance of this class in all the program. Usually it is implemented via private constructor and private static instance of itself included in class definition. Class has static getter method that returns static instance of it. The purpose of this pattern is to hold protected state through all the program.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!