Unverified Commit 99638d20 authored by Lokesh Singh's avatar Lokesh Singh Committed by GitHub

Create RuntimePolymorphism.java

parent e3738322
class Test {
public void method()
{
System.out.println("Method 1");
}
}
public class runtimePolymorphism extends Test {
public void method()
{
System.out.println("Method 2");
}
public static void main(String args[])
{
Test test = new runtimePolymorphism();
test.method();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment