simplethread2.java
来自「java 完全探索的随书源码」· Java 代码 · 共 26 行
JAVA
26 行
public class SimpleThread2 extends java.util.Date implements Runnable{ private String threadName = null; // Default Constructor public SimpleThread2( String name ) { super(); threadName = name; } // Private accessor for the instance variable private String getThreadName() { return this.threadName; } // Implement the run method required from the Runnable interface public void run() { // Do the thread work here this.setTime( System.currentTimeMillis() ); System.out.println( getThreadName() + ": " + this.toString() ); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?