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
When do you get classcastexception?
what invokes a threads run() method? : Java thread
What are the advantages of arraylist over arrays?
Can an interface have a class?
What are the four versions of java?
Explain about procedural programming language or structured programming language and its features?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
What is the default value of the local variables?
How to perform linear search in java?
What is a generic data type?
Explain abstract class in java?
Explain about transient variables in java?
What is a get method?
In a class implementing an interface, can we change the value of any variable defined in the interface?
Can we declare a constructor as final?