interface RemoteControl {
    void turnOn();
    void turnOff();
}

public class AnonyTest1 {
    public static void main(String args[]) {
        RemoteControl obj = new RemoteControl() {		// 익명 클래스 정의
            public void turnOn() {
                System.out.println("TV turnOn()");
            }
            public void turnOff() {
                System.out.println("TV turnOff()");
            }
        };
        obj.turnOn();
        obj.turnOff();
    }
}