a.使用父类作为方法形参实现多态
        public void play(Pet p){}
     b.使用父类作为方法返回值实现多态
        public Pet getPet(int type){}

相关文章:

  • 2022-01-24
  • 2021-11-27
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-07-01
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
相关资源
相似解决方案