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

Thread ac = new Thread(new Actoress(),"线程小姐");这样创建线程会报这个错 怎么办?

Thread ac = new Thread(new Actoress(),"线程小姐");这样创建线程会报这个错 怎么办? 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).

提问者:猫阿哥 2017-02-24 11:09

个回答

  • 大梵天1984
    2017-02-24 14:57:53

    改成静态类