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

Can I declare class as static or private?

1010


Why can't you declare a class as protected?

1208


What does flag mean in java?

1089


What is the common usage of serialization? What exceptions occur during serialization?

1200


What is java util hashmap?

1035


What's the default access specifier for variables and methods of a class?

1166


What is the vector class in java programming?

1144


Which types of exceptions are caught at compile time?

1081


Why do we need hashset in java?

1099


How will you print number in reverse (descending) order in BST.

1042


What is the latest java version?

1116


Can you extend main method in java?

1257


What is java and their uses?

1093


What's the difference between comparison done by equals method and == operator?

1022


Which arithmetic operations can result in the throwing of an arithmeticexception?

1064