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

Explain the scope of a variable.

1145


If you do not want your class to be inherited by any other class. What would you do?

1066


What is the purpose of default constructor?

1033


How do you join strings in java?

1110


what is heap memory?

1155


explain autoboxing in java?

1039


what is predefined function in java?

1022


What occurs when an object is constructed?

1060


What is the base class for error and exception?

1036


What is the default execution method in java?

1262


What are the restrictions that are applied to the java static methods?

1038


What are implicit objects in java?

1019


Is there a way to increase the size of an array after its declaration?

1086


Is set sorted in java?

990


Why scanner is used in java?

1127