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

What does j2ee stand for?

664


What is connector?

753


What is application client container?

714


What is group?

766


What is a java application server?

679


What are the main components of a class in java?

685


Why awt is used in java?

690


What is jetty in java?

690


Explain the four types of container that the j2ee specification defines

698


Is a relationship java?

672


What is jlayeredpane java?

659


to update a batch in a table in jdbc which method of statement object is used

1866


Who generates bytecode in java?

747


What is full form of j2ee?

723


Why is java called technology?

665