鹰空捍卫者
2015-10-12 22:01
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
深入浅出Java多线程
186088 学习 · 464 问题
相似问题