Java ?е?????????????
???????????? ???????[ 2013/12/17 10:45:20 ] ????????
????Java ?????????????????????????
?????????????????????????????????????????????????е?????????????????????е???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????·????????????
??????????????????????????????????????????
??????????????????????java ?е?????????????????????????? C++ ???????? java ?д???????????????ж??С???????C++ ???????????????????? java ??????????????????????????е?Ч????
????????????????????????????????????????
??????????
????1.??????????????????????????????????????????????
????2.???????????е??????????????????????????????
????3.????????????????????????
????4.???????????????????д???????????
????1.?????
???????? Java ?????Inner Class???????????????????????????????? C++ ????У??????????Nested Class?????????????????????????????????л??ж???????????????????????????????????????????????????????????????壩????????????????????????????????????Щ?????????????????????????????????????????????????????????????????Java???????????????????????????????????????????????Java????????????????????????????????????????????????????????????????
????* ????μ???
public interface Contents {
int value();
}
public interface Destination {
String readLabel();
}
public class Goods {
private class Content implements Contents {
private int i = 11;
public int value() {
return i;
}
}
protected class GDestination implements Destination {
private String label;
private GDestination(String whereTo) {
label = whereTo;
}
public String readLabel() {
return label;
}
}
public Destination dest(String s) {
return new GDestination(s);
}
public Contents cont() {
return new Content();
}
}
class TestGoods {
public static void main(String[] args) {
Goods p = new Goods();
Contents c = p.cont();
Destination d = p.dest("Beijing");
}
}
|
??????
???·???
??????????????????
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