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 the use of private constructor in core java?

Answer Posted / deep chandra harbola

private constructor are used to create Sinleton class.
example logger class
for singleton class only one object can be created.
by default member of singleton class are static.
singleton class can not be inherited.

Is This Answer Correct ?    29 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you change array size in java?

923


What is the difference between procedural and object-oriented programs?

938


Can we make main() thread as daemon?

1044


Why do we use return statement?

974


What is square root in java?

1044


Is 0 a real number?

981


How do you use compareto in java?

933


Give few difference between constructor and method?

922


Explain the difference between abstract classes and interfaces in java?

1106


What is serialversionuid?

1021


What is final class?

969


What are measurable parameters?

1019


What are static initalizers in java ?

968


Difference between object instantiation and construction ?

1015


Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?

8020