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 a singleton class in Java? And How to implement a singleton class?

Answer Posted / nashiinformaticssolutions

A class that can possess only one object at a time is called a singleton class. To implement a singleton class given steps are to be followed:
1. Make sure that the class has only one object
2. Give global access to that object

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How big is a 32 bit integer?

1035


What do you mean by singleton class in java?

896


What are unchecked exceptions in java?

1026


what is method reference in java 8?

1026


What is a superclass?

1340


Is java 9 released?

991


How does finally block differ from finalize() method?

1039


Can we use this () and super () in a method?

972


Why array is used in java?

955


Is string a class?

1017


What is exception hierarchy in java?

998


What is java virtual machine? Explain

1019


Does variable declaration allocate memory?

1022


Is a method a procedure?

1046


Is a char always 1 byte?

978