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 do you meant by Runtime Polymorphism?

Answer Posted / ramkiran

The function which calls at runtime ratherthan the
compiletime
Ex:
Class A
{
Public void test(){
System.out.println(“This is Base Class”);
}
}
Class B extends A{
Public void test(){
System.out.println(“This is Child Class”);
}

}
Class RuntimePoly{
Public static void main(){
A a = new A();
B b = new B();
A baseClassVar;

baseClassVar = a;
baseClassVar.test();

baseClassVar = b;
baseClassVar.test();



}
}

Is This Answer Correct ?    30 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is package protected in java?

993


What is null statement?

1029


Can java program run without jre?

1018


What is string in java?

1022


What is java ceil?

1039


Why is singleton class used?

1040


Explain illegalmonitorstateexception and when it will be thrown?

1106


What is diamond operator in java?

967


What is difference between string and stringbuffer?

1117


What is factor r?

969


Does java runtime require a license?

1081


What are the two ways in which thread can be created?

1055


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2829


Variables used in a switch statement can be used with which datatypes?

1005


What do you meant by active and passive objects?

1089