Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- class MyThread implements Runnable
- {
- public void run(int value)
- {
- for(int i=0;i<10;i++)
- {
- System.out.println("value = " + value);
- }
- }
- }
a. It will compile and throw runtime error.
b. It will compile and print value 10 times.
c. It will compile and run when start method is invoked.
d. The code will not compile.

ans d
Post new comment