好文档 - 专业文书写作范文服务资料分享网站

java单选题版 doc

天下 分享 时间: 加入收藏 我要投稿 点赞

6.

In Java, what is the signature of the method in the WindowListener interface where code is

to be added to end a program when the close button is pressed?

(a) void windowClosed (WindowEvent we) (b) void windowAdapter (WindowEvent we) (c) void windowDeactivated (WindowEvent we) (d) void windowClosing (WindowEvent we)

Correct answer is (d)

Your score on this question is: 10.00 7.

What is the signature of the method specified in the Java ActionListener interface?

(a) void actionListener (ActionEvent ae) (b) void actionEvent (ActionPerformed ap) (c) void actionPerformed (ActionEvent ae) (d) void actionPerformed (ActionListener al)

Correct answer is (c)

Your score on this question is: 0.00 8.

Which of the following is (are) true regarding event handling in Java?

When a GUI component is created, the component automatically has the ability to generate

events during user interaction.

Each Listener object must be registered with the specific component object or objects for

which the Listener object is to respond.

(a) I only (b) II only (c) I and II (d) None

Correct answer is (c) 9.

What is the signature of the method specified in the Java ListSelectionListener interface?

(a) void actionPerformed (ListSelectionEvent lse)

(b) void ListSelectionListener (ListSelectionEvent lse) (c) void valueChanged (ListSelectionEvent lse) (d) void valueChanged (ListSelectionListener lsl)

Correct answer is (c)

Your score on this question is: 10.00

10.

The ListSelectionEvent class and ListSelectionListener interface are available in the _____

package of Java.

(a) java.event

(b) java.awt.event (c) javax.event

(d) javax.swing.event

Correct answer is (d) 8.

From within a child class, its parent class is referred to via the keyword

(a) this (b) base (c) parent (d) super

Correct answer is (d) 4.

Consider the following UML class diagram.

According to the diagram, which of the following statements is (are) true?

ClassB is a specialization of ClassA. ClassA is a generalization of ClassC.

ClassC is involved in a self-containment loop.

(a) I and III only (b) II and III only (c) I and II only (d) I, II, and III

Correct answer is (d)

Your score on this question is: 0.00 8.

Consider the following UML class diagram.

Which of the following is (are) true about the system described by the diagram?

An instance of Picture can contain a collection of instances of the class Shape. An instance of Shape can contain a collection of instances of the class Picture.

(a) I and II (b) I only (c) II only (d) None

Correct answer is (b)

Your score on this question is: 0.00

Feedback:

See section 1.2.3, subsection \

the course notes.

java单选题版 doc

6.InJava,whatisthesignatureofthemethodintheWindowListenerinterfacewherecodeistobeaddedtoendaprogramwhentheclosebuttonispressed?
推荐度:
点击下载文档文档为doc格式
8v0bq9z01x5nd0e7n2yj9vfqx3d4pq015wo
领取福利

微信扫码领取福利

微信扫码分享