//匿名内部类
public class T1 {
public static void main(String[] args) {
new Thread() {
public void run() {
System.out.println("runing");
}
}.start();
}
}
//内部嵌套类
public class T1 {
private static final class Thread1 extends Thread {
public void run() {
System.out.println("runing");
}
}
public static void main(String[] args) {
new Thread1().start();
}
}
0