格林模拟试题一参考答案

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

 

answer 57)

4) a collection for storing bits as on-off information, like a vector of bits

this is the description given to a bitset in bruce eckels "thinking in java" book. the reference to unique sequence of bits was an attempt to mislead because of the use of the word set in the name bitset. normally something called a set implies uniqueness of the members, but not in this context.


answer 58)

4)compile error: superclass class1.base of class class1.class1 not found

using the package statement has an effect similar to placing a source file into a different directory. because the files are in different packages they cannot see each other. the stuff about file1 not having been compiled was just to mislead, java has the equivalent of an "automake", whereby if it was not for the package statements the other file would have been automatically compiled.


answer 59)

4) output of over.amethod()

the names of parameters to an overridden method is not important, but as the version of amethod in class base is set to be private it is not visible within over (despite over extending base) and thus does not take part in overriding. 
 


answer 60)

1) set the gridy value of the gridbagconstraints class to a value increasing from 1 to 4

answer 4 is fairly obviously bogus as it is the gridbagconstraints class that does most of the magic in laying out components under the gridbaglayout manager. the fill value of the gridbagconstraints class controls the behavior inside its virtual cell and the ipady field controls the internal padding around a component.

if you have a copy of the roberts and heller java2 guide that says the exam does not cover the gridbaglayout, this is an error. you can confirm this by looking at the online errata at

视频学习

我考网版权与免责声明

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

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

最近更新

社区交流

考试问答