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 run time polymorphism

Answer Posted / shiry

In C++ ;
if i have 2 clases
class A {

int x();
}
class B : public A {

int x();
}
void main(){

A* a = new B() ;
a.x(); // it will call the method of the super class A
// not B but in java it will call the method in the
// child B why ??

}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between overriding and overloading in java?

1079


What is externalizable?

1073


Which collection is ordered in java?

987


Can we override final method?

1019


Explain the concept of proper inheritance?

1076


How will you add panel to a frame?

1121


Is a boolean 1 bit?

1087


Can we override compareto method?

950


How to set the permissions to a file in java?

998


What is protected access modifier?

1010


What is the public field modifier?

1039


What is a locale?

1159


Explain java code for recursive solution's base case?

1042


Is there any limitation of using inheritance?

1095


Can constructor be inherited?

1047