표준입력 (stdin)
실행옵션 (runtime option)
코드:
실행 »
표준입력/실행옵션
interface Animal { public abstract void cry(); } interface Cat extends Animal { public abstract void cry(); } interface Dog extends Animal { public abstract void cry(); } class MyPet implements Cat, Dog { public void cry() { System.out.println("멍멍! 냐옹냐옹!"); } } public class prog { public static void main(String[] args) { MyPet p = new MyPet(); p.cry(); } }