/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
class Animal {
private void eat() {
System.
out.
println("animal eating"); }
}
class Horse extends Animal {
public void eat() {
System.
out.
println("Horse eating"); }
}
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
Animal a = new Horse();
a.eat();
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBBbmltYWwgewoKICAgIHByaXZhdGUgdm9pZCBlYXQoKSB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJhbmltYWwgZWF0aW5nIik7CiAgICB9Cn0KCmNsYXNzIEhvcnNlIGV4dGVuZHMgQW5pbWFsIHsKICAgIHB1YmxpYyB2b2lkIGVhdCgpIHsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkhvcnNlIGVhdGluZyIpOwogICAgfQp9Ci8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJCSAgICAgICAgQW5pbWFsIGEgPSBuZXcgSG9yc2UoKTsKICAgICAgICBhLmVhdCgpOwoKCX0KfQ==