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

How do you compile java?

493


What is event and listener in java?

426


Is eclipse written in java?

547


What is fatal error?

564


What is java web technologies?

497






What is callback methods Component methods called by the container to notify the component of important events in its life cycle?

531


What is j2ee application model?

478


Enlist the technologies embraced in j2ee?

529


Define orm and its working in j2ee?

537


Is tomcat a java ee?

487


What are the advanced technologies in java?

481


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

519


Is advanced java and j2ee same?

468


What is the mvc on struts?

514


I Want build and release interview questions

3127