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 platform independent in java?
What are the modules of j2ee?
What is java 2 platform, micro edition (j2me)?
Is java gui dead?
What is home interface?
what is direct link to download swing ebook,applet,ejb,core java
What is javafx java?
what is meant by proxy server
What is a component in java?
Why is java called object oriented?
What is external entity?
How will you explain load() and get() methods?
What is jbutton in java?
What is actionform?
Is j2ee a language or framework?