格林模拟试题一(下)(4)
百度广告
given the following code what will be output?
public class pass{public static void main(string argv){
pass p = new pass();
system.out.println(i);
}
public void amethod(int x){
j=j*2;
}
1) error: amethod parameter does not match variable
3) 10 and 40
question 42)
public static void main(string argv){
l.amethod();
public void amethod(){
//start for loop
ia[i]=i;
}
}
1) for(int i=0; i < ia.length() -1; i++)
3) for(int i=1; i < 4; i++)
question 43)
private class base{
int i = 100;
}
public class pri extends base{
public static void main(string argv){
system.out.println(i);
}
1) error at compile time
3) 100 followed by 200
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>