Thread类介绍

public void start()   :启动,但不一定是马上执行

public static Thread currentThread() :返回对当前正在执行的线程的对象的引用

public ClassLoader get ContextClassLoader()  :返回该线程的上下文ClassLoader。 上下文ClassLoader由线程创建者提供,供运行于该线程的代码 在加载类和资源时使用

public final boolean isAlive()

public Thread.State getState()

public final String getName()

public final void setName(String name) ; 设置该线程的名称

public final void setDaemon(boolean on)   ;  将该线程标记为守护线程或用户线程

public final void setPriority( int newPriority)  ;更改线程的优先级

public static void sleep(long mills) throws InterruptedException  ; 在指定的毫秒数内让当前正在执行的线程休眠(暂停执行)

public void interrupt();  中断线程

****  通常用如下代码来获取当前classpath的绝对路径  

// 使用方法链调用方式 获得当前classpath 的绝对路径的URL表示法

URL url=Thread.currentThread().getContextClassLoader().getResource("");

我的宣言
原文地址:https://www.cnblogs.com/starxingyun/p/3921282.html