abstract class Allat { String gyomor = ""; public void eszik(String etel) { gyomor += etel; } public abstract void beszel(); } class Szamar extends Allat { public void beszel() { System.out.println("ia\'ia\'"); } } class Boci extends Allat { public void beszel() { System.out.println("buuuuuuuuuu"); } } class Program01 { public static void main(String[] args) { Szamar pici = new Szamar(); pici.beszel(); Boci mici = new Boci(); mici.beszel(); } }