What is singleton class?
Answer Posted / kamlesh
SIngleton class is class which instantiate only once.means
suppose you are using JDBC/HIBERNATE in this don't need to
create the multiple instance for
Connection/SessionFactory , so for this we are using this
Singelton design pattern to create the instance for this.
and also with the help of static reference.
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
Why are arrays useful in java?
Is empty in java?
Does java allow overriding static methods ?
Can a class be private in java?
Can we override constructor in java?
What is an interoperable application in java ?
What is unicode datatype?
What do you understand by access specifiers in Java?
Is singleton class thread safe?
How to find the largest value from the given array.
Can an interface have a constructor?
What is default size of arraylist in java?
What is the difference between the paint() and repaint() methods in java programming?
Can a static class implement an interface?
What is meant by class loader? How many types are there? When will we use them?