请在 下方输入 要搜索的题目:

有以下类定义:abstract class Animal{ abstract void say();}public class Cat extends Animal{ public Cat(){ System.out.printf("I am a cat"); } public static void main(String[] args) { Cat cat=new Cat(); }}运行后哪一项判断是正确的?


A、Iamacat
B、Animal能编译,Cat不能编译
C、Animal不能编译,Cat能编译
D、编译能通过,但是没有输出结果有这样一段程序

发布时间:2025-11-03 06:20:56
推荐参考答案 ( 由 题搜搜 官方老师解答 )
答案:Animal能编译,Cat不能编译
登录 - 搜搜题库网
立即注册
注册 - 搜搜题库网
立即登录