Answer Posted / paletipatisrinu
singleton class:A java class create only one object per jvm
is called singleton java class.Most of jdbc driver class
implemented as a singleton java class
Ex:
class SingletonClass
{
private static SingletonClass singleObject;
public static SingletonClass getInstance()
{
if (singleObject == null)
{
singleObject = new SingletonClass();
}
return singleObject;
}
}
Singletone java class example is
org.apache.struts.action.ActionServlet
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is jpa a framework?
What is injection in java?
What is jep in java?
In java thread programming, which method is a must implementation for all threads?
Can we install jre without jdk?
In hibernate what is the difference between the Session and SessionFactory?
What is data encapsulation?
Can the main method be overloaded?
How long can a lambda function run?
What is java web application?
What does persist mean in java?
What is a context in java?
What is the difference between the boolean & operator and the && operator?
What is java ioc?
Why is lambda expression used?