class Dog(){
        eat();
}

ArrayList<Object> myArrayList = new ArrayList<Object>();
        Dog aDog = new Dog();
        myArrayList.add(aDog);
        object d =  myArrayList.get(0);
        (Dog)d.eat();
        

 

相关文章:

  • 2021-11-20
  • 2021-08-26
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2021-11-18
  • 2022-02-19
  • 2021-08-10
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案