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 native class in java?
What is java language expression?
When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?
Is jpa a framework?
I am trying to create a new universal user group. Why can't i? : java security
How common are security breaches? : java security
ioc vs dependency injection?
How do I run a java project?
Is it better to learn java or python?
In which language eclipse is developed?
What is lazy loading in jpa?
What is the difference between a jvm and a jdk?
How do I download and install eclipse on windows 10?
What's the difference between code-based security and role-based security? Which one is better? : java security
How do I install java on windows?