class TwoThreadsTest
{
	public static void main (String args[])
	{
		//ΪThreadOne ߳ʵִ
		new SimpleThread().start();
		//ΪThreadTwo ߳ʵִ
		new SimpleThread().start();
	}
}
class SimpleThread extends Thread 
{
	public void run()                    //߳ 
	{
		for (int i = 0; i < 10; i++)
		{
			System.out.println(i + " " + getName()); //õǰ߳
			try
			{
				sleep((int)(Math.random() * 1000));
			} 
			catch (InterruptedException e) {}
		}
		System.out.println("DONE! " + getName());
	}
}
