日期:2014-05-18 浏览次数:20778 次
public class Test extends Thread { public void run() { Log.x().info("thread start"); try { for (int i = 0; i < 100; i++) { Log.x().info("sleep" + i); Thread.sleep(1000); } } catch (Exception e) { Log.x().info("Exp"); } Log.x().info("thread end"); } public static void go() { // Create and start the thread Thread thread = new Test(); Log.x().info("call thread"); thread.start(); } }