?? currentthread.java
字號:
public class CurrentThread
{
public static void main(String args[])
{
Thread t=Thread.currentThread();
System.out.println("Current thread:"+t);
t.setName("My Thread");
System.out.println("After name change :"+t);
try
{
for(int n=5;n>0;n--)
{
System.out.println(n);
Thread.sleep(1000);
}
}catch (InterruptedException e)
{
System.out.println("Main thread interrupted");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -