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

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

我在main()函数写调用Actress的代码,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).

求教各位!

正在回答

2 回答

把Actress类写在Actor类外面就可以了

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

慕无忌3281512

我写到外面了,还是出错
2017-05-24 回复 有任何疑惑可以回复我~
#2

慕无忌3281512

我试了写到里面,然后把Actress()改为Actor.Actress()还是那句出现错误,这到底是怎么回事?求教大神
2017-05-24 回复 有任何疑惑可以回复我~

建议你把你写的代码复制出来,在这个输入框有一个代码语言可以选

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

举报

0/150
提交
取消

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

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