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 are desktop procedures?

1043


What is ellipsis in java?

1085


What is the private method modifier?

1089


Can we execute a program without main() method?

1037


What is thread synchronization in java?

893


How many decimal places is a double?

995


Can a class be private in java?

993


What is a ternary operator in java? What is an interface?

1001


What is matcher in java?

1002


What is OOP Language?

1073


What is float in java?

990


What is quick sort in java?

1015


Why is singleton not thread safe?

1050


What about main() method in java ?

1019


How many digits is int32?

980