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 private constructor?what are the uses of writing
private constructor in our program?

Answer Posted / neha

we can not create instance of object with new operator.if u
do not want the class to be inherited then we declare the
construtor as private when we used Private Construtor
Static metods are used this construtor are also used for
creating singleton object

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a variable?

891


How to use arraylist in java netbeans?

974


Why is a string immutable?

937


What are the different conditional statements?

934


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

930


What are the classes of java?

917


Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

2236


Is 0 true or is 1 true?

898


What is an argument java?

918


What methodology can be utilized to link to a database?

900


What is executor memory?

889


If a class is declared without any access modifiers, where can the class be accessed?

1004


Where we write javascript code in html page?

998


Why map is used in java?

980


What is the difference between yielding and sleeping in java programming?

1071