- 3
- 0
- 约8.3千字
- 约 11页
- 2022-06-09 发布于浙江
- 举报
第6课面向对象测试题您的姓名:[填空题]*_________________________________1运行结果是()[单选题]*AExceptionBA,B,ExceptionC第12行编译失败D第6行编译失败(正确答案)E运行时候抛出空指向异常2下面那个声明是正确的()[单选题]*A代码不需要修改就可以编译通过B如果在Tree类中加入publicTree(){Plant();},代码将编译通过C如果在Plant类
第6课面向对象测试题
您的姓名:[填空题]*
import java.io.lOException;
class A {
public void process() { System.out.printin(A,);)
□ class B extends A {
8
9
10
11
12
13
14
15
public void process() throws lOException { super.process();
System.out.println(Bz);
throw new lOException();
public static void main (String []args) { try {new B().process();}
catch (lOException e) ( System.out.printIn( Exception);} }
运行结果是()[单选题]*
A Exception
B A,B,Exception
C第12行编译失败
D第6行编译失败
E运行时候抛出空指向异常
123456789
E class Plant{
private String name; public Plant(String name) { this.name= name;} public String gotName() { return name; }
L }
原创力文档

文档评论(0)