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 are the components of J2EE application?
Which java technology is in demand?
What is general entity?
How will you explain cdata?
What will happen when you compile and run the following code?
Is java gui dead?
Is java more difficult than c++?
Is java procedural or object oriented?
Describe orm?
What are the main components of multi-tier architecture?
How does event listener work in java?
What does resource adapt module contain?
What is java naming and directory service?
What is the best java compiler?
What is DDP?