多选题

对于如下代码,描述正确的是: class Animal{

发布于 2022-03-03 16:11:43

对于如下代码,描述正确的是:
class Animal{
   public void move(){
      System.out.println("the animal is moving")
   }
}
 
class Dog extends Animal{
   public void move(){
      System.out.println("the dog can run")
   }
   public void bark(){
      System.out.println("the dog can bark")
   }
}
 
public class TestDog{
   public static void main(String args[]){
      Animal a = new Animal()  
      Animal b = new Dog()    
   }
}


登录后免费查看答案
关注者
0
被浏览
46
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看