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


Please Help Members By Posting Answers For Below Questions

Give few difference between constructor and method?

757


Explain the importance of import keyword in java?

789


Can private method static?

685


What is the purpose of javac exe?

801


Can we have any code between try and finally blocks?

791


How to change value in arraylist java?

780


How to perform linear search in java?

769


What is methods in java?

788


How to make a non daemon thread as daemon?

837


What invokes a thread's run() method in java programming?

841


Define max and min heap, also the search time of heap.

843


Explain wait() method of object class ?

908


What are peerless components in java programming?

798


How do you create a sop?

758


What is a bufferedreader?

764