问答详情
源自:2-3 Java线程-隋唐演义实战开发---演员简介

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

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

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

提问者:鹰空捍卫者 2015-10-12 22:01

个回答

  • 慕移动9181930
    2022-03-24 08:02:18

    去意见反馈。会有人解决的

  • qq_时光机_11
    2017-03-27 00:00:00

    为什么 我的就报错

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

  • 慕斯卡4106679
    2015-11-09 22:32:05

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

  • 星际怪物
    2015-10-14 10:11:30

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