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 class instance variable?

1111


What is multiple inheritance? Is it supported by java?

959


Where are global variables stored?

945


What is the main method java?

1025


Which browsers work with java?

1069


What is gc()?

1058


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

1083


What is array class in java?

1057


Explain the importance of finalize() method.

963


Explain about static nested classes in java?

1058


What is the difference between Java1.4 and Java1.5

2301


What is difference between printf and scanf?

1134


What are thread groups?

996


What is a void method?

918


What is the symbol for average?

1025