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");
}
}
|
??????

???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44