abstract class Dyr{ abstract void lagLyd(); } class Hund extends Dyr{ void lagLyd(){ System.out.println("Voff!"); } } class Katt extends Dyr{ void lagLyd(){ System.out.println("Mjau!"); } } class TestDyr{ public static void main(String[] args){ Dyr hund1 = new Hund(); Dyr katt1 = new Katt(); hund1.lagLyd(); katt1.lagLyd(); } }