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

take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1980


What is busy spin, and why should you use it?

1085


What is the difference between menuitem and checkboxmenu item?

1338


What are the two types of java?

1174


Define an abstract class with reference to java.

997


Why string is not a wrapper class?

1183


Explain the differences between static and dynamic variables?

1150


Can an anonymous class be declared as implementing an interface and extending a class in java programming?

1282


What is string pool?

1125


What is a line separator in java?

980


What is advantage of java?

1025


What is tochararray in java?

936


When should you use arraylist and when should you use linkedlist?

932


What is meant by collection in java?

1075


How do I enable java in safari?

1035