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 spliterator in java se 8?
Which is more secure: java or activex? : java security
What is web container in java?
What is lambda value?
What is the purpose of jdk?
what are the different phases in delivering the project during development and maintenance?
can anyone tell me what kind of questions are asked for core java exam in aptech
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. Define how can I implement this logic?
Can the main method be overloaded?
What is crud operations in java?
What is aop in java?
What is entitymanager in java?
What is gui in java with examples?
How can I swap two variables without using a third variable?
What is @override annotation in java?