The question reads: What can you write at the comment //A in the following code that writes the word "running" to the standard output?
class RunTest implements Runnable { ���public static void main(String[] args) { ������RunTest rt = new RunTest(); ������Thread t = new Thread(rt); ������// A ���} ���public void run() { ������System.out.println("running"); ���} ���void go() { ������start(1); ���} ���void start(int i) { ���} } The question asks for all valid options: a. System.out.println("running"); b. t.start(); c. rt.start(); d. rt.start(1); I get that a is correct, but why so b? The argument list doesn't match. Thanks, Barbara [This message has been edited by Barbara Dyer-Bennet (edited September 17, 2000).] [This message has been edited by Barbara Dyer-Bennet (edited September 17, 2000).] [This message has been edited by Barbara Dyer-Bennet (edited September 17, 2000).]
refered to ...jdk1.2.2/docs/api/java/lang/Thread.html#start() public void start() Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread. call start() then call run(), so "running" is print out