📄 simplethread.java
字号:
public class SimpleThread extends Thread{ // Default Constructor public SimpleThread( String name ) { super(); } // Override the parents run method to get the work done public void run() { // Do the thread work here System.out.println( getName() + " entered run method" ); try { System.out.println( getName() + " going to sleep..." ); // Tell this thread to go to sleep for 3000 millseconds sleep( 3000 ); } catch( InterruptedException ex ) { // Do nothing for now when this exception is raised } System.out.println( getName() + " woke up from sleep" ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -