- 12
- 0
- 约 12页
- 2016-07-19 发布于湖北
- 举报
面向对象练习题集研讨
面向对象练习题集
//1
写出程序结果
class Demo {
public static void func() {
try {
throw new Exception();
}
finally {
System.out.println(B);
}
}
public static void main(String[] args) {
try {
func();
System.out.pritnln(A);
}
catch(Exception e) {
System.out.println(C);
}
System.out.println(D);
}
}
//2
写出程序结果
class Test {
Test() {
System.out.println(Test);
}
}
class Demo extends Test {
Demo() {
super();
System.out.println(Demo);
}
public static void main(String[] args) {
new Demo();
new Test();
}
}
//3
写出程序结果
interface A {}
class B implements A {
public
原创力文档

文档评论(0)