package ch14; public class Test15 { public static void main(String[] args) { Thread runThread=Thread.currentThread(); System.out.println("當前執行緒名稱:"+runThread.getName()); System.out.println("當前執行緒標識:"+runThread.getId()); } }
當前執行緒名稱:main 當前執行緒標識:1