无忧首页企业系统我的无忧
无忧服务:
兼职活动培训
娱乐交友:
交友社区资讯
全职实习:
实习暑假寒假
微信号:school51
扫一下,立即关注
加关注
在线支付,立省10元
下载新版APP
===大学生成长生活平台===

JAVA题库:格林模拟试题三(下)(3)

2012-12-26来源/作者:卫凯点击次数:491

 

question 38)

which of the following statements are true?

1) code must be written if the programmer wants a frame to close on selecting the system close menu
2) the default layout for a frame is the borderlayout manager
3) the layout manager for a frame cannot be changed once it has been assigned
4) the gridbaglayout manager makes extensive use of the the gridbagconstraints class.


question 39)

given the following class definition

public class droitwich{
        class one{
                private class two{
                        public void main(){
                        system.out.println("two");
                        }
                }
        }
}

which of the following statements are true


1) the code will not compile because the classes are nested to more than one level
2) the code will not compile because class two is marked as private
3) the code will compile and output the string two at runtime
4) the code will compile without error


question 40)

given the following code

class base{
static int oak=99;
}

public class doverdale extends base{
public static void main(string argv[]){
        doverdale d = new doverdale();
        d.amethod();
        }
        public void amethod(){
        //here
        }       
}

which of the following if placed after the comment //here, will compile and modify the value of the variable oak?

1) super.oak=1;
2) oak=33;
3) base.oak=22;
4) oak=50.1;





相关阅读



关于我们 | 联系我们 | 用户指南 | 网站地图 | 意见建议 | 会员注册 | 用户协议 | 隐私政策