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 predefined function in java?

936


Print Vertical traversal of a Binary Tree.

979


What is preparedstatement in java?

978


What is the public method modifier?

952


What is comparable and comparator interface? List their differences

1031


Is zero a positive integer?

987


explain local datetime api in java8?

966


What is java beans?

937


What is boolean example?

891


Why stringbuilder is not thread safe in java?

967


Why do we need data structure in java?

1017


List some features of the abstract class.

996


How long will it take to learn java?

938


What carriage return means?

909


How do you add spaces in java?

940