class A{
  int x,y;
  void setXY(int x,int y){
    this.x=x;
    this.y=y;
  }
  int multiply(){
    return x*y;
  }
}
class B extends A{
  int x,z;
  
  
  B(int x,int z){
    super();
    this.x=x;
    this.z=z;
  }
  int multiply(){
    return x*y*z;
  }
  
}
public class Test{
  public static void main(String args[]){
  B b=new B(6,9);
      A a=new B(5,10);
      a.setXY(10,20);
    // a.z=30;
      System.out.println("m="+a.multiply());
      
      b.setXY(7,8);
      b.z=10;
      int m=b.multiply();
      System.out.println("m="+m);
  }
}
运行的时候会出现NosuchmethodError:setXY   为31的错误`
为什么会出现这样的错误`
求教`