what will be the output of the following code........
in my machine it is printing A but i think it should throw IllegalThreadStateException but it is not throwing any exception .I run this program so many times on my machine but is is running fine and throwing no exception.
class A extends Thread {
public void run() {
System.out.print("A");
}
}
class B {
public static void main (String[] args) {
A a = new A();
a.start();
try {
a.join();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
a.start(); // 1
}
}
[ January 10, 2008: Message edited by: Anuj Kr. ]
[ January 10, 2008: Message edited by: Anuj Kr. ]