Java多線程2:Thread經常使用方法

currentThread() currentThread()方法可返回代碼段正在被哪一個線程調用的信息。 Thread.currentThread().getName();web Example:異步 class MyThread1 extends Thread { MyThread1(){ System.out.println("執行構造函數"+Thread.curre
相關文章
相關標籤/搜索