is it possible to create single instance of java class per
session in web application
Answer Posted / sk.bilal ahmed
yes
eg.,
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 ? | 0 Yes | 2 No |
Post New Answer View All Answers
How java is reliable?
What is callback methods?
What is actionform?
What is B2B?
What is 2 stands for in j2ee?
How do you run a java program?
What is java ee technologies?
What is difference between java and core?
I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????
What is client-certificate authentication?
What is declarative security ?
How many types of constructors are there in java?
What is deployment descriptor?
Is java is fully object oriented?
How do I become an expert in java?