background image

}

}
public class Hello{

public static void main(String[] ars){

A ab = new B(); //执行到此处,结果是_________
ab = new B(); //执行到此处,结果是_________

}

}

3、事务的 4 个特性是:_________、_________、___________、____________

4.判断以下代码有无错误,如有请指出错误明细:
abstract class Something {

private abstract String doSomething ();

}

5. 判断以下代码有无错误,如有请指出错误明细:
public class Something {

public int addOne(final int x) {

return ++x;

}

}

6. 判断以下代码有无错误,如有请指出错误明细
public class Something {

public static void main(String[] args) {

Something s = new Something();
System.out.println("s.doSomething() returns " + doSomething());

}
public String doSomething() {

return "Do something ...";

}

}

7. 判断以下代码有无错误,如有请指出错误明细
interface Playable {

void play();

}
interface Bounceable {

void play();

2