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

What are decalarations?

1121


Can a class be a super class and a sub-class at the same time? Give example.

1548


Can finally block be used without a catch?

1007


Does java support multiple inheritance or not?

1095


What is the purpose of static methods and static variables?

1071


Explain the differences between static and dynamic variables?

1145


What are selection structures?

998


When would you use a static class?

978


What is difference between core java and java ee?

895


What is the final blank variable?

1134


Can we serialize singleton class?

1033


What causes memory leak in java?

934


Is java a virus?

948


what is the difference between preemptive scheduling and time slicing? : Java thread

1033


What is function and its uses?

1114