问答详情
源自:1-2 Java多线程基础概念介绍

怎么新建线程?

对了,怎么新建一个线程了?

Throw.........

提问者:学霸985 2019-02-28 22:49

个回答

  • 精慕门0548516
    2019-03-01 16:19:41
    已采纳

    Thread thread = new Thread();

    Thread thread = new Thread(String name);

    Thread thread =  new Thread(Runnable runnable);

    Thread thread = new Thread(Runnable runnable, String name);

    入参name可以通过Thread.currentThread.getName()获得