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

How large is a boolean?

949


how would you implement a thread pool? : Java thread

844


Does isempty check for null?

953


Can a class extend 2 classes in java?

981


What is difference between Heap and Stack Memory?

979


What is the difference between a synchronized method and a synchronized block?

1014


What are keyboard events?

1094


What is nullpointerexception?

983


What is java life cycle?

947


What method is used to specify a container's layout in java programming?

1045


Describe the process as to how substring() methodology mechanisms in java.

1043


What is the meaning of nullable?

968


Why are generics used?

908


What are peerless components in java programming?

958


Can we extend a class with private constructor?

933