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

A private constructor is a special instance constructor. It is commonly used in classes that contain static members only. If a class has one or more private constructors and no public constructors, then other classes (except nested classes) are not allowed to create instances of this class.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a parameter in a function?

993


How do you take thread dump in java?

996


Why convert an applet to an application?

1099


Why do we need singleton?

963


What is stringjoiner ?

953


What is the difference between state-based unit testing and interaction-based unit testing?

939


I want to print “hello” even before main is executed. How will you acheive that?

1081


Does java return by reference?

999


Explain abstract class in java?

1064


Can we clone singleton class in java?

956


When do you call copy constructor?

971


How to create a fecelet view?

985


What is codebase?

1000


How many bits is a string?

990


How are observer and observable used in java programming?

1027