class ThreadTestDemo
{
public static void main(String[] args)
{
new Thread()
{
public void run()
{
for(int x=0;x<50;x++)
System.out.println(Thread.currentThread().getName()+"男"+x);
}
}.start();
Runnable r = new Runnable()//匿名内部类实现接口不可传递参数?
{
public void run()
{
for(int x=0;x<50;x++)
System.out.println(Thread.currentThread().getName()+".....女女女女....."+x);
}
};
Thread t = new Thread(r);
t.start();
}
}