Sei que é ridiculo. Mas não estou entendendo prq este codigo dispara esta exeção 
public class ThreadTester
{
public static void main(String args[])
{
PrintThread thread1, thread2, thread3, thread4;
//criando os objetos
thread1 = new PrintThread("thread1");
thread2 = new PrintThread("thread2");
thread3 = new PrintThread("thread3");
thread4 = new PrintThread("thread4");
thread1.start();
thread2.start();
thread3.start();
thread4.start();
System.err.println("\nComeçando as thread :D ");
}
}
class PrintThread extends Thread
{
//atributos
int sleepTime;
//construtor
public PrintThread(String name)
{
super(name);
sleepTime = (int) (Math.random()*5000);
}
//metodos
//metodo redefinido da classe pai. contrala a execulção da Thread
public void run()
{
try
{
System.err.println(getName() + "going to sleep");
Thread.sleep(sleepTime);
}
catch (InterruptedException intex)
{
System.err.println(intex.toString());
}
System.err.println(getName() + "done sleeping");
}
}