格林模拟试题一(下)(5)
question 44)
what will the following code print out?
public class oct{oct o = new oct();
}
int oi= 012;
}
1)12
3)10
question 45
what will happen when you try compiling and running this code?
public class ref{ref r = new ref();
}
int i=99;
system.out.println(i);
public void multi(ref r){
}
1) error at compile time
3) an output of 198
question 46)
you need to create a class that will store unique object elements. you do not need to sort these elements but they must be unique.
what interface might be most suitable to meet this need?
1)set
3)map
question 47)
which of the following will successfully create an instance of the vector class and add an element?
1) vector v=new vector(99);
2) vector v=new vector();
3) vector v=new vector();
4 vector v=new vector(100);
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>