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
What is maven in java?
What are jpa repositories?
What is crud operations in java?
What is the difference between map and flatmap in java?
What happens when you omit a brace or misspell one of the words, like public or
What is numberformatexception in java?
What is the difference between lambdas and delegates?
What are the new features about Java se 8 ?
What is jersey in java?
What is resultsetmetadata in java?
What is java lang?
What is loose coupling in java?
I have deployed a .war file in my application server comprising of struts and hibernate.If i want to change the "dialect" property of hibernate cfg file how can i change(I have only .war file)... Thanks in advance
What are orm tools in java?
What services can invoke lambda?