Thread actressThread = new Thread(new Actress(),"Ms. Runnable");
能解释一下这一行代码吗?详细点,谢谢
为什么 我的就报错
No enclosing instance of type Actor is accessible. Must qualify the allocation with an enclosing instance of type Actor (e.g. x.new A() where x is an instance of Actor).
调用了这个方法,可以查查JDKpublic Thread(Runnable target, String name)
没看视频,new Actress() 应该是实现runnable接口类吧,"Ms. Runnable"给该线程一个Threadname