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


Please Help Members By Posting Answers For Below Questions

Describe orm?

744


What is jbutton in java?

713


What is pure java?

749


What is element?

745


Is java important for my computer?

683


What are the j2ee technologies?

686


What is context root?

756


What is application configuration resource file?

715


How do you make a class immutable in java?

650


J2ee is a container centric architecture. Explain.

710


What is application component provider?

774


What is application client container?

733


What are the components of j2ee?

669


What is j2ee api?

753


What is java 2 platform, micro edition (j2me)?

740