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?

Answers were Sorted based on User's Feedback



What is a singleton class in Java? And How to implement a singleton class?..

Answer / 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

What is a singleton class in Java? And How to implement a singleton class?..

Answer / 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

More Core Java Interview Questions

What are class types in java?

0 Answers  


Are registers volatile?

0 Answers  


Why we used break and continue statement in java?

0 Answers  


How to handle a web browser resize operation?

0 Answers  


Can constructor be static or final?

0 Answers  


Which language is java?

0 Answers  


What is isa relationship?

0 Answers  


What is the file type?

0 Answers  


What is singleton class in java and how can we make a class singleton?

0 Answers  


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

0 Answers   MCN Solutions,


How to sort elements in a parallel array in java?

0 Answers  


class a extends b { } class b extends a { } why java doesn't support cyclic pls explain me with example

3 Answers   Wipro,


Categories