why does this give me compile error that Thread(Runnable) can not be found....
Ankur kothari wrote:why does this give me compile error that Thread(Runnable) can not be found....
Compiles fine for me -- eclipse using Java 5.
Please, please, please indent your code
you should do it for yourself, so that you'll have an easier time debugging stuff.
You should do it so that when you show your code to other people they won't be tempted to poke your eyes out.
Folkert Meeuw wrote:
What is the result ?
(C) Compilation fails
(D) The code runs with no output
(E) An exception is thrown at runtime
C - If there is mistake on line 12
D - If you fix line 12 and If you do not call t.start();
B - If you fix line 12 and If t.start() is called, because the anonymous class created overrides the run method.