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

Why is it so that we can have virtual constructors but we
cannot have virtual destructors?

Answer Posted / rdl

We can have Virtual Destructor. We cannot have virtual
constructor, becoz, if the constructor is virtual, in
polymorphism, there may be a chance for the base class
constructor not to get executed. so the entire class will
not be available.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism what is it for and how is it used?

984


How is class defined?

1083


What does no cap mean?

1015


Why do we use class?

1044


What is destructor example?

999


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2562


Is abstract thinking intelligence?

999


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2159


What is polymorphism and types?

1054


Where is pseudocode used?

1053


What is encapsulation process?

1014


Why polymorphism is used in oops?

1016


What is abstraction with example?

1066


What is the difference between static polymorphism and dynamic polymorphism?

1039


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

2095