Tuesday, August 17, 2010


Courtesy of Sun Web Learning Center

A programmer wants to create a class called MyThread that instantiates a Thread in the main method.

Given the following three statements:
I.  MyThread must extend Thread.
II. MyThread must implement Thread.
III.MyThread must override public void run().

Which must occur to achieve the desired result?

A Only statement I.
B Only statement II.
C Only statements I and II.
D Only statements I and III.
E None of the three tasks must occur.

No comments:

Post a Comment