Java?????????
???????????? ???????[ 2015/11/30 11:50:37 ] ??????????????????? ???????
???????????ж??峣????
????????java interface??????????????????????????static final?????η????????????????
????public interface Constants{
????String name = "111";
????}
????public class read{
????public static void main(String[] args){
????System.out.println("Class Constants's name = " + Constants.name);
????}
????}
?????????????????static final ????Σ????????????interface Constants??name????????????class read?У?????????????á??????????±???class read??interface Constants??name??????仯??????class read?з????
???????????ж???
????public class Constants{
????private static final String name = "111";
????public static String getName(){
????return name;
????}
????}
????public class read{
????public static void main(String[] args){
????System.out.println("Class Constants's name = " + Constants.getName());
????}
????}
????class read?????Constants class??getName()?????????????????name???????????????class Constants?е?????????????±??????????class read??
??????????????jdk???????????javap??????read.class??????????????javap -c read?????????????????
??????
???·???
??????????????????
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