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

Which eclipse is best for java?

516


Can java run on google chrome?

559


Explain about interrupt() method of thread class ?

651


What are aggregate functions explain with examples?

515


What is boolean used for?

582






Explain about collection interface in java?

536


What is a data structure java?

494


What is tochararray in java?

492


What are constructors in java?

560


Explain about doubly linked list

608


Write code to implement bubble sort in java?

549


Why super is first line in java?

548


Explain importance of inheritance in java?

595


Can we make constructors static?

711


what is the difference between thread and runnable types? : Java thread

540