一下是我为了验证多线程的程序  请大家帮我看看怎么改才能正常运行  我想运行出第一个线程是打印是个0  后一个线程是打印出0到9
第一个文件
public class MyThread extends Thread{
public int x=0;

public void run()
{
System.out.println(x++);
}class R implements Runnable{
private int x=0;
public void run(){
System.out.println(x++);
}
}
}
第二个文件:public class Test1 { public static void main(String[] args) throws Exception{
//创造对象来实现线程的启动
for(int i=0;i<10;i++){
Thread t =new MyThread();
t.start();
}
Thread.sleep(10000);

R r=new R(); //这句报错
for(int i=0;i<10;i++){
Thread t=new Thread(r);
t.start();
}
}}