为了账号安全,请及时绑定邮箱和手机立即绑定

Thread actressThread = new Thread(new Actress(),"Ms. Runnable");

Thread actressThread = new Thread(new Actress(),"Ms. Runnable");

能解释一下这一行代码吗?详细点,谢谢

正在回答

4 回答

为什么 我的就报错

 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).

0 回复 有任何疑惑可以回复我~

调用了这个方法,可以查查JDKpublic Thread(Runnable target, String name)

0 回复 有任何疑惑可以回复我~
#1

慕斯卡4106679

写错字,是API
2015-11-10 回复 有任何疑惑可以回复我~

没看视频,new Actress() 应该是实现runnable接口类吧,"Ms. Runnable"给该线程一个Threadname



0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Thread actressThread = new Thread(new Actress(),"Ms. Runnable");

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信