格林模拟试题一(下)(6)
question 48)
you have created a simple frame and overridden the paint method as follows
public void paint(graphics g){}
1) the string "dolly" will be displayed at the centre of the frame
3) the lower part of the word dolly will be seen at the top of the frame, with the top hidden.
question 49)
what will be the result when you attempt to compile this program?
public class rand{int irand;
system.out.println(irand);
}
1) compile time error referring to a cast problem
3) a random number between 0 and 1
question 50)
given the following code
import java.io.*;public static void main(string argv){
t.amethod();
public void amethod(){
iocall();
}
what code would be most likely for the body of the iocall method
1) public void iocall ()throws ioexception{din.readchar();
2) public void iocall ()throw ioexception{
din.readchar();
3) public void iocall (){
din.readchar();
4) public void iocall throws ioexception(){
din.readchar();
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>