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 / guest

In Runtime polymorphism the JVM will decide which version
of the method supposed to used.

for example
class Animal{
public void speak(){
System.out.println("Animal speak method callinfg");
}
}

public class Dog extends Animal{
public void speak(){
System.out.println("Dog speak method calling");
}

public static void main(String args[]){

Animal a = new Dog();

a.speak();// u r calling now Animal class speck metod.
}
}
here JVM will decide to execute Dog version of speck
method . This is called runtime polimorphism

thanks
prasad thota

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the synonym of framework?

1001


what is thread? : Java thread

983


What does .equals do in java?

1096


What is singleton class in ruby?

1016


What is the main use of generics in java?

991


What is a super method?

978


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

1035


If a class is declared without any access modifiers, where can the class be accessed?

1066


What is mean by collections in java?

1180


Explain the advantages of packages in java?

917


when you will synchronize a piece of your code? : Java thread

1026


What is an interoperable application in java ?

1001


What is the buffer limit?

1029


What is a treeset class?

1008


Explain wait() method of object class ?

1227