abstract class Hewan {

protected String nama;

protected int jumKaki ;

protected boolean bisaBeranak = false;

public Hewan(String nama, int kaki, boolean beranak) {

this.nama = nama;

jumKaki = kaki;

bisaBeranak = beranak;

}

public abstract void bersuara();

public static void makan() {

System.out.println(“woookkkkk, wooookkkk, woooookkkk”);

}

public void isHewan() {

System.out.println(“nama : “+nama);

System.out.println(“jumlah kaki : “+jumKaki);

System.out.println(“bisa beranak : “+bisaBeranak);

}

}

Interface Amphibi {

public void melompat();

public void bersuara();

}

interface Kodok {

public void melompat();

public void bersuara();

}

}

class Katak extends Hewan {

public Katak() {

super(“Katak”, 4, false);

}

public void bersuara() {

System.out.println(“\nwooookkk,,,,wooookkk”);

}

public static void makan() {

System.out.println(“yummi…yummmiii…”);

}

public static void main(String[] args) {

Katak s= new Katak();

s.isHewan();

s.bersuara();

Hewan.makan();

makan();

}

}

OUTPUT :

java_tika