1.

Predict the output:public class Test extends Thread{private int i;public void run(){i++;}public static void main(String[] args){Test a = new Test();a.run();System.out.print(a.i);a.start();System.out.print(a.i);}}

A. rints
B. rints
C. rints
D. ompiler error
E. llegalThreadStateException is thrown
Answer» D. ompiler error


Discussion

No Comment Found