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...

Can we have a private constructor ?

Answer Posted / srikanth

We can make a constructor Private or protected.
1. Private constructor is classic example of implementing a
singleton class( A class with a single instance)
2. Protected constructors can be used when the class cannot
be instantiated but can only be inherited.

Is This Answer Correct ?    108 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstraction in oop?

1132


Why do we use oops?

1010


What polymorphism means?

1068


What is object in oop with example?

1232


What is difference between data abstraction and encapsulation?

1076


What does and I oop mean?

1172


What is object-oriented programming? Webopedia definition

1255


Why interface is used?

1014


Why is destructor used?

1018


What is oops in simple words?

1084


write a program to find 2^n+1 ?

2063


What is interface? When and where is it used?

2163


What is encapsulation with real life example?

1032


What are the important components of cohesion?

1020


What is a null tree?

1133