class Tester {
public static void main
(String[] args
) { Base obj = new Derived();
obj.method(25);
}
}
class Base {
public static void method(int a) {
System.
out.
println("Base Method"); }
}
class Derived extends Base {
public static void method(int a) {
System.
out.
println("Derived Method"); }
}
Y2xhc3MgVGVzdGVyIHsKcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewpCYXNlIG9iaiA9IG5ldyBEZXJpdmVkKCk7Cm9iai5tZXRob2QoMjUpOwp9Cn0KY2xhc3MgQmFzZSB7CnB1YmxpYyBzdGF0aWMgdm9pZCBtZXRob2QoaW50IGEpIHsKU3lzdGVtLm91dC5wcmludGxuKCJCYXNlIE1ldGhvZCIpOwp9Cn0KY2xhc3MgRGVyaXZlZCBleHRlbmRzIEJhc2UgewpwdWJsaWMgc3RhdGljIHZvaWQgbWV0aG9kKGludCBhKSB7ClN5c3RlbS5vdXQucHJpbnRsbigiRGVyaXZlZCBNZXRob2QiKTsKfQp9