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

Difference between string, stringbuffer and stringbuilder?

1032


What is the significance of continue jump statement? Explain with an example.

1290


What is string syntax?

1054


How to sort double array in java?

988


Is java hashset ordered?

1114


What is treeset in java collection?

970


Explain a situation where finally block will not be executed?

1041


What is the purpose of using java.lang.class class?

1016


What do you know about the garbage collector in java?

1089


Is nullpointerexception checked or unchecked?

1033


Why javac is not recognized?

943


How many ways can you break a singleton class in java?

984


Why is core java important?

1043


Should a main method be compulsorily declared in all java classes?

1067


Is array an object in java?

964