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 declaring constructor as private?

Answer Posted / ranganathkini

By declaring the class constructor as private, other classes
cannot create instances of the class.

This design is usually used in singleton patterns.

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible for yielded thread to get chance for its execution again ?

1022


What is tochararray in java?

932


What does nullpointerexception mean?

1078


Can a class extend 2 classes in java?

1028


What is size_t?

978


Can we use a switch statement with strings?

1039


What is thread safe singleton?

941


How is string stored in java?

1057


What is the purpose of the main method?

983


What is garbage collector?

1061


What is a method vs function?

1033


What are three advantages of using functions?

1005


what is mena by object block any what is the use of that

2210


What is queue in java?

1139


Define linked list and its features with signature?

984