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

来源:java认证发布时间:2012-11-12 12:47:49java认证视频

 

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;

视频学习

我考网版权与免责声明

① 凡本网注明稿件来源为"原创"的所有文字、图片和音视频稿件,版权均属本网所有。任何媒体、网站或个人转载、链接转贴或以其他方式复制发表时必须注明"稿件来源:我考网",违者本网将依法追究责任;

② 本网部分稿件来源于网络,任何单位或个人认为我考网发布的内容可能涉嫌侵犯其合法权益,应该及时向我考网书面反馈,并提供身份证明、权属证明及详细侵权情况证明,我考网在收到上述法律文件后,将会尽快移除被控侵权内容。

最近更新

社区交流

考试问答