- interface Inter
- {
- public static final int NUM=3;
- public abstract void show();
- }
- class Test implements Inter
- {
- public void show(){}
- }
- class Demo
- {
- public static void main(String[] args)
- {
- Test a = new Test();
- // System.out.print(a.NUM);
- System.out.print(Test.NUM);
- // System.out.print(Inter.NUM);
- }
- }
复制代码
Test.NUM是如何调用的,求解释! |