JAVA认证格林模拟试题二答案及解析
来源:优易学  2009-11-28 15:39:39   【优易学:中国教育考试门户网】   资料下载   IT书店
文章页内部300*250广告位

 

answer 11)

2)myarray.length;

the string class has a length() method to return the number of characters. i have sometimes become confused between the two.


answer 12)

3) a frame with one large button marked four in the centre

the default layout manager for a frame is the borderlayout manager. this layout manager defaults to placing components in the centre if no constraint is passed with the call to the add method.


answer 13)

4) do nothing, the flowlayout will position the component


answer 14)

1) use the setlayout method

answer 15)

1) ipadx
2) fill
3) insets


answer 16)

2) the buttons will run from left to right along the top of the frame

the call to the setlayout(new flowlayout()) resets the layout manager for the entire frame and so the buttons end up at the top rather than the bottom.


answer 17)

2) it is a field of the gridbagconstraints class for controlling component placement
3) a valid settting for the anchor field is gridbagconstraints.north


answer 18)

4) clean compile but no output at runtime


this is a bit of a sneaky one as i have swapped around the names of the methods you need to define and call when running a thread. if the for loop were defined in a method called public void run() and the call in the main method had been to b.start() the list of values from 0 to 9 would have been output.


answer 19)

2) false

you can re-use the same instance of the gridbagconstraints when added successive components.


answer 20)

4) an interface that ensures that implementing classes cannot contain duplicates


上一页  [1] [2] [3] [4] [5] [6] 下一页

责任编辑:小草

收藏此页】【 】【打印】【回到顶部
计算机文章页底部500*200广告
文章搜索:
 相关文章
计算机底部580*90广告
文章页右侧第一330*280广告
计算机文章页资讯推荐
热点资讯
文章页330尺寸谷歌广告位
热门课程培训