1:继承Thread类,重写run()方法
2:实现Runnable接口,实现run()方法;
3:实现Callable接口,
4:利用线程池
参考链接:https://www.cnblogs.com/li666/p/11139968.html