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

文章作者 100test 发表时间 2007:03:14 17:38:06
来源 100Test.Com百考试题网


question 38)

which of the following statements are true?

1) code must be written if the programmer wants a frame to close on 0selecting 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.



相关文章


Java基础-创建Java程序中的线程池
SCJP考点总结及SCJP考试要点分享[2]
技巧心得:J2ME学习札记3
JAVA题库:格林模拟试题三(下)(5)
JAVA题库:格林模拟试题三(下)(3)
SCWCD考试心得分享
Java基础-Java语言的Util类详细介绍
Java基础-Java语言的Socket类详细介绍
JAVA题库:格林模拟试题三(下)(2)
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛