class Base {
public void fun()
{
System.
out.
println("Base fun"); }
}
class Derived extends Base {
public void fun()
{
System.
out.
println("Derived fun"); }
public static void main
(String[] args
) { Base obj = new Derived();
obj.fun();
}
}
Y2xhc3MgQmFzZSB7CiAgcHVibGljIHZvaWQgZnVuKCkKICB7CiAgICAgU3lzdGVtLm91dC5wcmludGxuKCJCYXNlIGZ1biIpOwkgCiAgfQp9CiAgCmNsYXNzIERlcml2ZWQgZXh0ZW5kcyBCYXNlIHsKICBwdWJsaWMgdm9pZCBmdW4oKQogIHsKICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkRlcml2ZWQgZnVuIik7CSAKICB9CiAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICBCYXNlIG9iaiA9IG5ldyBEZXJpdmVkKCk7CiAgICAgIG9iai5mdW4oKTsKICB9ICAKfQogIAo=