开放大学在线学习搜题
当前位置:首页 > 学习题库 > B编程语言

问题

interface A{ int x = 0; } class B{ int x =1; } class C extends B implements A { public void pX(){ System.out.println(x); } public static void main(String[] args) { new C().pX(); } }

发布时间:2025-05-22   作者:形考任务   浏览:0

interface  A{

   int x = 0;

}

class B{

   int x =1;

}

class C extends B implements A {

   public void pX(){

      System.out.println(x);

   }

   public static void main(String[] args) {

      new C().pX();

   }

}