is it possible to create single instance of java class per
session in web application
Answer Posted / ananth
by using Singleton pattern we can achieve one instance per
class.
Public final class Singleton{
private static Singleton singleton;
public static Singleton getInstance()
{
if(singleton ==null)
{
singleton=new Singleton();
}
retuen singleton;
}
public void getvalue()
{
}
}
Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What is java naming and directory service?
What is wildfly java?
What is setfocusable in java?
Describe the ear, war, and jar.
What is j2ee product provider?
I Want build and release interview questions
What is event in java?
What is j2ee application model?
What is the preferred size of a component in java?
What does enterprise javabeans module contain?
What is authorization?
What is single tier architecture in java?
What is awt panel java?
What is enterprise information system?
What is full form of j2ee?