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

Can you have two constructors in java?

496


Can we compare two strings in java?

554


What are Normalization Rules? Define Normalization?

545


Give any two differences between C++ and java.

554


Can we override tostring method in java?

526






How many techniques can be employed to create a string object?

551


What is a parameter in simple terms?

550


Will minecraft java be discontinued?

642


Why char array is favored over string for the storage of passwords?

553


What is difference between an object and a class?

603


What type of variable is error flag?

583


What is keyset in java?

651


What are the six ways to use this keyword?

602


Define class?

512


What is the difference between inner class and nested class?

548