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 private constructor?what are the uses of writing
private constructor in our program?

Answer Posted / christian

a common use for a private constructor is to implement the
singletton pattern, which uses a public member variable of
the same type of the class which is defined. A public
getInstance() method uses this private constructor

Is This Answer Correct ?    13 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss about garbage collector in Java.

1075


How do I know if java is installed?

1083


What is the old name of java?

992


What is the difference between == and === javascript?

1178


What is the purpose of a default constructor?

1097


What do you mean by singleton class in java?

904


How to create an interface?

1080


Why volatile is used in java?

1054


What does string intern() method do?

1081


What is run time allocation?

1019


What are the two main uses of volatile in Java?

1058


What is default locale java?

1113


What is local declaration?

964


What is the maximum size of a string in java?

1099


What is Recursion Function?

1197