格林模拟试题二(上)(8)
百度广告
which of the following is the correct syntax for suggesting that the jvm performs garbage collection
1) system.free();
3) system.out.gc();
question 28)
public class as{
int j;
boolean b;
as a = new as();
}
system.out.println(j);
}
1) compilation succeeds and at run time an output of 0 and false
3) compile time error b is not initialised
||| question 29)
public class arg{
public static void main(string argv){
}
public void amethod(){
}
1) compile time error
3) compilation and output of "there"
question 30)
what will happen when you attempt to compile and run the following code
public class streq{streq s = new streq();
private streq(){
string s2 = new string("marcus");
system.out.println("we have a match");
system.out.println("not equal");
}
1) compile time error caused by private constructor
3) output of "not equal"
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>