格林模拟试题二参考答案Java认证考试

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


answer 1)

1) the code will compile and run, printing out the words "my func"

a class that contains an abstract method must be declared abstract itself, but may contain non abstract methods.


answer 2)

4) the code will compile but will complain at run time that main is not correctly defined

in this example the parameter is a string not a string array as needed for the correct main method


answer 3)

1) public
2) private
4) transient

the keyword transient is easy to forget as is not frequently used. although a method may be considered to be friendly like in c it is not a java keyword.


answer 4)

2) the compiler will complain that the base class is not declared as abstract.

if a class contains abstract methods it must itself be declared as abstract


answer 5)

1) to get to access hardware that java does not know about
3) to write optimised code for performance in a language such as c/c


answer 6)

4) success in compilation and output of "amethod" at run time.

a final method cannot be ovverriden in a sub class, but apart from that it does not cause any other restrictions.


answer 7)

4) compilation and execution without error

it would cause a run time error if you had a call to amethod though.



相关文章


格林模拟试题三参考答案(4)Java认证考试
格林模拟试题三参考答案(3)Java认证考试
格林模拟试题三参考答案(2)Java认证考试
格林模拟试题三参考答案(1)Java认证考试
格林模拟试题二参考答案Java认证考试
格林模拟试题一参考答案Java认证考试
JAVA题库:格林模拟试题三(下)(9)Java认证考试
JAVA题库:格林模拟试题三(下)(7)Java认证考试
JAVA试题:JAVA面试题目整理Java认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛