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.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Ankur kothari wrote:i am compiling from command....there is a compile error that Thread(Runnable) constructor.....cannot find symbol with location java.lang.Thread
Ankur kothari wrote:i am compiling from command....there is a compile error that Thread(Runnable) constructor.....cannot find symbol with location java.lang.Thread
I am not getting error from the command line also.
Folkert Meeuw wrote:
What is the result ?
(A) Cat
(B) Dog
(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.
I knew I would regret that burrito. But this tiny ad has never caused regrets:
Free, earth friendly heat - from the CodeRanch trailboss