题目
题目
单项选择题

What happens if you try to instantiate an abstract class?

选项
A.You can instantiate an abstract class, but it will throw an AbstractMethodError at runtime.
B.You can instantiate an abstract class, but it will be treated as a regular class without any special behavior.
C.The code will not compile, and a compilation error will occur.
D.You can instantiate an abstract class without any issues.
查看解析

查看解析

标准答案
Please login to view
思路分析
Let’s go step by step and examine each option in the context of object-oriented programming languages that enforce abstract classes. Option 1: 'You can instantiate an abstract class, but it will throw an AbstractMethodError at runtime.' This is incorrect in most languages like Java. Abstract classes cannot be instantiated, regardless of whether they have ......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!