/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
abstract class AbstractClass {
abstract void methodA();
}
class ChildClass1 extends AbstractClass {
void methodA() {
// Implementation for methodA
System.
out.
println("I am ChildClass1's methodA"); }
}
class ChildClass2 extends ChildClass1 {
// No implementation for methodA
}
class ChildClass3 extends ChildClass2 {
// No implementation for methodA
}
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
ChildClass1 object1 = new ChildClass1();
ChildClass1 object2 = new ChildClass2();
ChildClass3 object3 = new ChildClass3();
object1.methodA();
object2.methodA();
object3.methodA();
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgoKYWJzdHJhY3QgY2xhc3MgQWJzdHJhY3RDbGFzcyB7CiAgICBhYnN0cmFjdCB2b2lkIG1ldGhvZEEoKTsKfQogCmNsYXNzIENoaWxkQ2xhc3MxIGV4dGVuZHMgQWJzdHJhY3RDbGFzcyB7CiAgICB2b2lkIG1ldGhvZEEoKSB7CiAgICAgICAgLy8gSW1wbGVtZW50YXRpb24gZm9yIG1ldGhvZEEKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkkgYW0gQ2hpbGRDbGFzczEncyBtZXRob2RBIik7CiAgICB9Cn0KIApjbGFzcyBDaGlsZENsYXNzMiBleHRlbmRzIENoaWxkQ2xhc3MxIHsKICAgIC8vIE5vIGltcGxlbWVudGF0aW9uIGZvciBtZXRob2RBCn0KIApjbGFzcyBDaGlsZENsYXNzMyBleHRlbmRzIENoaWxkQ2xhc3MyIHsKICAgIC8vIE5vIGltcGxlbWVudGF0aW9uIGZvciBtZXRob2RBCn0KCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcH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