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

What is difference between module and function?

1146


What is the file type?

1008


What's the access scope of protected access specifier?

1020


what do you mean by marker interface in java?

968


What if I write static public void instead of public static void in java?

1072


Explain about static imports in java?

986


why using interface interface ?

2029


What is an eror in java?

1029


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

910


Can we declare an array without size in java?

968


Can constructor be protected in java?

953


What happens if we don’t define serial version uid?

1019


What is a pattern what is an anti pattern?

948


What is the difference between inner class and nested class?

1065


Variable of the boolean type is automatically initialized as?

996