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

What is unsigned char?

1129


If two threads have same priority which thread will be executed first ?

1575


What is the purpose of javac exe?

1148


What happens when you add a double value to a string?

1060


Why deletion in linkedlist is fast than arraylist?

1151


How do you write a scanner class in java?

1065


What is the purpose of void?

1034


how can you take care of mutual exclusion using java threads? : Java thread

1100


Is java a software?

1005


Is it possible to compare various strings with the help of == operator?

1054


Can private method static?

978


What is numeric function?

1072


Is alive method in java?

1039


What is difference between equals and hashcode method?

1206


Can we clone singleton class in java?

1017