public class ThreadTest
{
public static void main(String args[])
{
Test test=new Test();
test.start();//启动线程必须调用start()方法
Test2 test2=new Test2();
test2.start();
}
}
class Test extends Thread
{
@Override
public void run()
{
for(int i=0;i<100;i++)
{
System.out.println((char)i);
}
}
}
class Test2 extends Thread
{
@Override
public void run() {
// TODO Auto-generated method stub
System.out.println("The Second Thread Class!");
}
}