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

How do you replace a string in java?

549


How does regex work?

528


What are different types of classloaders?

591


I want to re-reach and use an object once it has been garbage collected. How it's possible?

557


Which is better ascii or unicode?

577






What are byte codes?

659


What is thread safe in java?

555


What is difference between checked and unchecked exception in java?

584


Can we rethrow the same exception from catch handler?

569


What is hashing in java?

571


What is break and continue statement?

618


What is the similarity between dynamic binding and linking?

615


Explain covariant method overriding in java.

546


What is jdbc api?

544


Why array is used in java?

521