Question: 52
Which of the following event listeners have event adapters defined in Java?
A. MouseListener
B. KeyListener
C. ActionListener
D. ItemListener
E. WindowListener
Explanation:
Four listeners don't have their corresponding event adapters. They are ActionListener, ItemListener, AdjustmentListener and TextListener.
Correct Answer: A,B,E 52 of 60
Question: 53
Which one of the following methods is not related to the display of the applets?
A. update()
B. draw()
C. repaint()
D. paint()
Explanation:
The paint(), update() and repaint() are predefined methods in Java. They are related to the display of the applets.
Correct Answer: B 53 of 60
Question: 54
Given the following definition:
TextArea ta = new TextArea (Hello, 5, 5);
Which statements are true?
A. The maximum number of characters in a line is 5.
B. The displayed height is 5 lines otherwise constrain.
C. The displayed string can use multiple fonts.
D. The displayed strings are editable.
Explanation:
The TextArea is constructed to a 5 row * 5 character text area. It cannot display multiple fonts. The strings are editable by default. The displayed width of a line is 5 characters, but the maximum number in a line is more than 5.
Correct Answer: B,D 54 of 60
Question: 55
Which method can be used to add MenuBar to a Frame?
A. setMenu()
B. setMenuBar()
C. add()
D. addMenuBar()
Explanation:
MenuBar is added to a Frame by using the setMenuBar() method. The add() method is used to add components to containers.
Correct Answer: B 55 of 60
相关链接:JAVA认证考试报考指南 考试论坛 考试知道 考试动态
(责任编辑:yyb)