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

Is overriding possible in java?

1006


What is the static variable?

1178


What are the basic concepts of OOPS in java?

1087


How do listeners work?

1099


How many types of keywords are there?

1032


What is treeset in java?

1040


What does index mean in java?

1036


What are the types of inner classes (non-static nested class) used in java?

1110


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

1216


What will be the default values of all the elements of an array defined as an instance variable?

1077


What is an empty list in java?

1028


What are the advantages of unicode?

1057


What flag up means?

1073


What is a default constraint?

1114


What is abstraction in java?

1141