为什么和老师讲的代码是一样的却运行不了
package com.imooc.concurrent;
public class Actor extends Thread {
public void fun() {
System.out.println(getName() +"is an actor");
int count = 0;
System.out.println(getName() + "show begins"+(++count));
System.out.println(getName() +"show is over");
}
public static void main(String[] args) {
Thread actor = new Actor();
actor.setName("Mr.Thread");
actor.start();
}
}