develog

callback 본문

Dev/Java

callback

냐옴 2013. 7. 9. 14:31

public class TestCallback {

    public static void main(String[] args) throws Exception {

        TestCallback main = new TestCallback();

        main.test(new ICallBack() {

            public void callbackMethod() {

                System.out.println(">> ICallBack.callbackMethod()");

            }

        });

    }

    

    public void test(ICallBack callback) {

        callback.callbackMethod();

    }

}


interface ICallBack {

    public void callbackMethod();

}



'Dev > Java' 카테고리의 다른 글

dbunit jar download  (0) 2013.07.09
Async  (0) 2013.07.09
[java] 배열내 중복 체크  (0) 2013.07.02
generate file name  (0) 2013.07.02
String 비교  (0) 2013.07.02
Comments