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

What happens if an exception is not handled in a program?

1045


How do you create immutable object in java?

988


What are the benefits of operations?

894


explain copyonwritearraylist and when do we use copyonwritearraylist?

899


What is hashmap and map?

958


Can a private method of a superclass be declared within a subclass?

959


What is the difference between private & public & friendly classes?

1015


If a class is declared without any access modifiers, where can the class be accessed?

1007


Similarity and difference between static block and static method ?

871


Why null value is used in string?

980


What is meant by design patterns?

977


Explain the difference between map and flatmap stream operation?

1196


Explain heap sort?

1042


What are the basic interfaces of java collections framework?

1043


Why string is immutable with example?

907