???????????ж??峣????
????????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?????????????????