Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is platform independent in java?

908


What are the modules of j2ee?

868


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

1006


Is java gui dead?

856


What is home interface?

977


what is direct link to download swing ebook,applet,ejb,core java

2543


What is javafx java?

951


what is meant by proxy server

4801


What is a component in java?

841


Why is java called object oriented?

898


What is external entity?

946


How will you explain load() and get() methods?

931


What is jbutton in java?

867


What is actionform?

910


Is j2ee a language or framework?

863