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

How does arraylist work in java?

1035


Is there any tag in htm to upload and download files?

994


What is == and === in javascript?

988


Can we instantiate interface in java?

1088


Can we call a non-static method from inside a static method?

956


What is the purpose of the file class in java programming?

956


What is boolean flag in java?

1033


what is the volatile modifier for? : Java thread

926


What is the major drawback of internal iteration over external iteration?

967


Can a source file contain more than one class declaration?

911


What are the differences between checked exception and unchecked exception?

919


Explain the importance of finalize() method.

915


What is difference between public static and void?

936


What is concurrent hashmap and its features?

1019


Why method overriding is used?

1019