0

error??

class ABCD extends Thread { public static void main(String args[]) { ABCD r=new ABCD(); r.start(); System.out.print("one"); r.start(); System.out.print("two"); } public void run() { System.out.print("thread"); } }

17th Dec 2016, 2:53 AM
Somnath Ghosh
Somnath Ghosh - avatar
1 Answer
+ 5
starting a single thread twice in a program will surely lead you to an error because it is not compulsary that your thread dies as soon as they run..
17th Dec 2016, 7:26 AM
Sachin Artani
Sachin Artani - avatar