public class TestMain {
public static void main(String[] args) {
//回调函数..
TestMain.getBack(new CallBack(){
public void excute() {
System.out.println("这就是回调函数...");
}
});
}
public static void getBack(CallBack callback)
{
System.out.println("时间1"+new Date().toLocaleString());
System.out.println("时间2"+System.currentTimeMillis());
callback.excute();
}
}
interface CallBack
{
public void excute();
}