格林模拟试题三参考答案(4)Java认证考试

文章作者 100test 发表时间 2009:04:30 07:58:46
来源 100Test.Com百考试题网


answer to question 39)

4) the code will compile without error

there are no restrictions on the level of nesting for inner/nested classes. inner classes may be marked private. the main method is not declared as public static void main, and assuming that the commandline was java droitwich it would not be invoked anyway.


answer to question 40)

1) super.oak=1.
2) oak=33.
3) base.oak=22.

because the variable oak is declared as static only one copy of it will exist. thus it can be changed either through the name of its class or through the name of any instance of that class. because it is created as an integer it canot be assigned a fractional component without a cast.


answer to question 41)

obje question 41)

4) use the gettext method of a textfield and use the parseint method of the integer class

here is an example of how you might do this

integer.parseint(txtinputvalue.gettext()).

im not sure that a question on this actually will come up in the exam but it is a very useful thing to know in the real world.


answer to question 42)

4) none of the above

the wrapper classes are immutable. once the value has been set it cannot be changed. a common use of the wrapper classes is to take advantage of their static methods such as integer.parseint(string s) that will returns an integer if the the value has been set it cannot be changed. a common use of the wrapper classes is to take advantage of their static methods such as integer.parseint(string s) that will returns an integer if the string contains one.



相关文章


SCJP试题-SCJPMockExam2Java认证考试
SCJP试题SCJPMockExam1Java认证考试
JAVA题库:最新java试题测试(2)Java认证考试
JAVA题库:最新java试题测试(1)Java认证考试
格林模拟试题三参考答案(4)Java认证考试
格林模拟试题三参考答案(3)Java认证考试
格林模拟试题三参考答案(2)Java认证考试
格林模拟试题三参考答案(1)Java认证考试
格林模拟试题二参考答案Java认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛