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

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


answer to question 27)

2) output of "hello crowle"

this code is an example of a short circuited operator. because the first operand of the || (or) operator returns true java sees no reason to evaluate the second. whatever the value of the second the overall result will always be true. thus the method called place is never called.


answer to question 28)

4) none of the above.

you may access methods of a direct parent class through the use of super but classes further up the hierarchy are not visible


answer to question 29)

2) a method with the same name completly replaces the functionality of a method earlier in the hierarchy

option 3 is more like a description of overloading. i like to remind myself of the difference between overloading and overriding in that an overriden method is like something overriden in the road, it is squashed, flat no longer used and replaced by something else. an overloaded method has been given extra work to do (it is loaded up with work), but it is still being used in its original format. this is just my little mind trick and doesnt match to anything that java is doing.


answer to question 30)

2) the / operator is used to divide one value by another
3) the # symbol may not be used as the first character of a variable

the % is the modulo operator and returns the remainder after a division. thus 10 % 3=1
the $ symbol may be used as the first character of a variable, but i would suggest that it is generally not a good idea. the # symbol cannot be used anywhere in the name of a variable. knowing if a variable can start with the # or $ characters may seem like arbitrary and non essential knowlege but questions like this do come up on the exam.



相关文章


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