???????Java???????
???????????? ???????[ 2014/7/11 10:49:33 ] ??????????????? java
??????????????Spring????????????????????????????????б????Java???????????????????£?????????о???????Spring?????????????????????????
???????????????????????????棬??????????????????????????Java??????????????????????????????
??????仰??????????????????????????????????????÷?????????????????????л????“If you call me?? i will call back”??
??????????????????????????????????????????????
????class A?????InA ——????1
????class A?а??????class B??????b ——????2
????class B??????????InA?????test(InA a) ——????3
????A?????a????B??????????????test(a) ——?????????you call me
???????b??????test?????е???InA????? ——?????????i call you back
?????????????????????????????????????????????????????
??????PS?????????????????磬????????????????????????磬????о???????????????????????????????????????????
//??????InA
public interface BoomWTC{
//???????????
public benLaDengDecide();
// ??к????ó
public void boom();
}
//????class A
public class At$911 implements BoomWTC{//?????????1??
private boolean decide;
private TerroristAttack ta;//?????????2??
public At$911(){
Date now=new Date();
SimpleDateFormat myFmt1=new SimpleDateFormat("yy/MM/dd HH:mm");
this.dicede= myFmt.format(dt).equals("01/09/11 09:44");
this.ta=new TerroristAttack();
}
//???????????
public boolean benLaDengDecide(){
return decide;
}
// ??к????ó
public void boom(){
ta.attack(new At$911);//class A????class B??????????????????????you call me??
}
}
//????class B
public class TerroristAttack{
public TerroristAttack(){
}
public attack(BoomWTC bmw){——???????????3??
if(bmw.benLaDengDecide()){//class B??????л??class A????????????i call you back??
//let's go.........
}
}
}
|
????????????????????????ɡ?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11