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 singleton class is one that can only have one object at a time. The following procedures must be followed in order to implement a singleton class:

Verify that there is only one object in the class.

Allow the item to be accessed globally.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is string in java?

1225


Give a practical example of singleton class usage?

1047


How can constructor chaining be done using this keyword?

1254


What method is used to specify a container's layout in java programming?

1115


How many ways can an argument be passed to a subroutine and explain them?

1015


How do you represent a space in regex java?

997


What is the purpose of stub and skeleton?

1016


Why are lists ordered in java?

1002


What is a default constructor and also define copy contrucyor?

1093


Is there any tag in htm to upload and download files?

1037


Can we sort hashmap in java?

938


What is the difference between an if statement and a switch statement?

1147


Is null a string?

982


How do you remove duplicates from an array in java?

938


What is data member in java?

1019