注意:此页面搜索的是所有试题
22. (多选题)
下面代码执行后,正确的输出结果包括( )
public class FinalFinallyFinalize {
final StringBuilder sb = new StringBuilder("init");
public static void main(String[] args) {
FinalFinallyFinalize fff = new FinalFinallyFinalize();
System.out.println(fff.sb.toString());
fff.sb.append(" changed");
System.out.println(fff.sb.toString());}}(本题4.0分)
A、 init
B、 init changed
C、 init init
D、 changed changed
下面代码执行后,正确的输出结果包括( )
public class FinalFinallyFinalize {
final StringBuilder sb = new StringBuilder("init");
public static void main(String[] args) {
FinalFinallyFinalize fff = new FinalFinallyFinalize();
System.out.println(fff.sb.toString());
fff.sb.append(" changed");
System.out.println(fff.sb.toString());}}(本题4.0分)
A、 init
B、 init changed
C、 init init
D、 changed changed
参考答案