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 will you get the platform dependent values like line separator, path separator, etc., ?

1004


In how many ways we can do exception handling in java?

977


What is the core java?

937


What is the advantage of OOP in java?

1123


How do you remove spaces in java?

1015


What does escaping a character mean?

998


What is the final keyword denotes?

1097


What are the main features of java?

950


What is %d in printf?

1031


What does opcode mean?

1062


Does java vector allow null?

935


What is string pool?

1094


What is the difference between yielding and sleeping?

1092


What is 16 bits called?

931


What is the use of singleton?

948