方法的覆盖java

package jicheng.a;

class person{

    void fly()

    {

        System.out.println("你会飞吗");

    }

}

class st extends person{

    void fly()

    {

        System.out.println("起码比你好一点");

        super.fly();

    }

}

public class fugai {

    public static void main(String[] args) {

        // TODO Auto-generated method stub

       st p=new st();

       p.fly();

    }

}

方法的覆盖java

方法的覆盖java

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-04-01
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2021-05-10
  • 2021-08-30
  • 2021-07-21
  • 2021-05-28
  • 2021-06-13
  • 2021-06-28
相关资源
相似解决方案