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
Can we compare two strings in java?
Explain how to force the garbage collection in java.
What is the concatenation operator in java?
What is the difference between static (class) method and instance method?
Can we override the private methods?
What is a parameter example?
What are the two main uses of volatile in Java?
Explain the hierarchy of java exception classes?
How do you end a program?
State differences between C and Java?
How to write custom exception in java?
what is aggregation in java?
Why webdriver is an interface?
Can you access the private method from outside the class?
What is literal example?