Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

runtime polymorphism



Share on Google+Share on Google+

runtime polymorphism
1 Answer(s)      7 years ago
Posted in : Development process
View Answers

November 21, 2009 at 11:21 AM

Hi Friend,

The run-time polymorphism is basically the Method Overriding.Here super class reference is referring to subclass object and compiler does not know which method to call.

For ex:
class Flower {
void which() {
System.out.println("A Beautiful flower.");
class Rose extends Flower {
void which() {
class Lotus extends Flower {
void which() {
class RuntimePolymorphism {

public static void main(String[] args) {
Flower ref1 = new Flower();
Rose ref2 = new Rose();
Lotus ref3 = new Lotus();

For more information,please visit the following links:



Related Tutorials/Questions & Answers:
runtime polymorphism - Development process
runtime polymorphism  how run time polymorphism is achieved  Hi Friend, The run-time polymorphism is basically the Method Overriding.Here super class reference is referring to subclass object and compiler does
polymorphism  can we achieve without overriding polymorphism
dynamic polymorphism
dynamic polymorphism  give an example for dynamic polymorphism?   Dynamic polymorphism is where a class overrides a superclass method... seen at runtime, so they are considered dynamic. Here is an example
dynamic polymorphism
dynamic polymorphism  Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism
Polymorphism in actionscript
Polymorphism in actionscript  Hi....... Please implement How polymorphism works on actionscript? Thanks  Ans: class Worker extends Employee { override public function receivePayment():Number { return 0
Polymorphism - Java Beginners
Polymorphism  what is dynamic polymorphism? with example  Hi friend, Dynamic polymorphism is run time polymorphism. Thanks  The term static polymorphism is associated with overloaded methods because
Polymorphism - Java Beginners
Q: Isn't it possible to detect the method's associatation, in case of method... is run (run-time polymorphism) ? Isn't java compiler having such an ability... Polymorphism means the ability to take more than one form. Polymorphism
Polymorphism in Hibenate - Hibernate
Polymorphism in Hibenate  Hi, How polymorphism inheritance and association achieved in hibernate. Thank u in advance
Does hibernate support polymorphism?
Does hibernate support polymorphism?  Hi, Does hibernate support polymorphism? thanks
Run time polymorphism
Run time polymorphism  What is run time polymorphism or dynamic method dispatch
Java run time polymorphism
Java run time polymorphism  What is run-time polymorphism or dynamic method dispatch
Polymorphism - Java Beginners
Polymorphism  type of polymorphism  In Java polymorphism... Or we can also say that a polymorphism is possible in both state Static and Dynamic. Coz polymorphism means in many forms. So do not get confused of it just
Polymorphism in Java 7
This tutorial describe concept of Polymorphism. It is one of OOPs concept
Dynamic polymorphism - Java Beginners
Dynamic polymorphism  Develop with suitable hierarchy, classes for point, shape, rectangele, square, circle,ellipse, triangle, polygon, etc. Design a simple test application to demonstrate dynamic polymorphism.. Thanks
Dynamic Polymorphism - Java Beginners
Dynamic Polymorphism  Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism.? Thanks
polymorphism - Java Beginners
polymorphism  what is polymorphism? what is the advantage of function overloading? explain the concept of operator overloading?  Hi Friend, Please visit the following links:
Polymorphism : Method Overriding
In this tutorial you will learn another concept of polymorphism that is method overriding
PHP Polymorphism Function
PHP Polymorphism Function: The PHP Polymorphism Method is one of the feature of OOP language. Generally we get polymorphism in two ways: Compile time Run time Compile time polymorphism PHP is like function overloading, operator
Polymorphism : Method Overloading
In this tutorial you will learn one of polymorphism concept that is method overloading with example in Java 7
What is Polymorphism in Java?
Polymorphism in Java means a subclass, though having its own unique behavior... IS-A relationship is polymorphic. In Polymorphism, common interface is used while writing code. Single polymorphism is achieved by method overriding while multiple
Runtime error
Runtime error  I have written 3n+1 code in java and it gives correct o/p but when i submit my code online for my contest it says runtime error.. how to know where is problem
Runtime Class
Runtime Class  How can we halt d execution withd help of exit(arg) method?? ...pls tag a code
runtime error
runtime error  still i am getting runtime error as:the specified dsn contains an architecture mismatch between the driver and application   Hi, This error is related to some OS related problem. "dsn contains
runtime exception hibernate
runtime exception hibernate  runtime exception hibernate
thread runtime process
thread runtime process  Java thread runtime process
( Inheritance,need help in Polymorphism, Overriding) - Java Beginners
( Inheritance,need help in Polymorphism, Overriding)  can any one please help me create this application,thank you Advanced Concepts with Classes( Inheritance, Polymorphism, Overriding) Employees in a company are divided
Java question to implement polymorphism - Java Beginners
Java question to implement polymorphism  I have a question that i need to answer:- Using the principle of polymorphism provide implementation for the calculateFees() method for each Online Fax Subscription type
; OOPs revolve around the four concepts: 1. Encapsulation 2. Polymorphism..., programmatically. Here we will discuss Polymorphism briefly: -- Polymorphism... behavior to method calls of the same name. -- Polymorphism does not allow
java runtime error - JDBC
java runtime error  when i m running my program using type1 driver it is showing a runtime error of SQLException of unable to create the connection object.please give the solution