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...

what is singleton class? where it mainly used in the
projects?

Answer Posted / jhuma

singleton class is such kind of class in which only one
object is created throughout the life time of the class.

class Singleton
{
public static Singletone si;
private Singletone()
{
si=new Singletone();
}
public static Singletone show()
{
return si;
}
public static void main(String ar[])
{
Singleton s1=Singletone.show();
}
}

Is This Answer Correct ?    44 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ioc concept & explain it?

1047


Is there a guarantee of uniqueness for entity beans?

973


For which statements does it make sense to use a label?

1036


What restrictions are placed on the values of each case of a switch statement?

969


What is TL and its use?

2419


What are the purpose of introspection?

1177


What is the difference between system.out ,system.err and system.in?

1064


What is the purpose of the notify() method?

1029


Why doesn’t the focus feature on the tag work in every circumstance?

1049


what is Activation Instantinator?

2386


What is the difference between the ‘font’ and ‘fontmetrics’ class?

1119


If your ui seems to freeze periodically, what might be a likely reason?

992


What is a tasks priority and how is it used in scheduling?

1021


What are the difference between RMI and CORBA?

1069


how to use debug in my elipse to solve problems that exist in my project

2238