课后习题

 1 package com.java; 
 2 
 3 public class time extends Thread{
 4     
 5     public void run(){
 6         while(true){    
 7             System.out.println("2016");
 8         try{
 9             Thread.sleep(100);
10         }catch(Exception e){
11             e.printStackTrace();
12         }
13         }
14     }
15     public static void main(String[] args) {
16         new time().start();
17     }    
18 }

posted @ 2016-03-15 16:39  宫崎天川  阅读(144)  评论(0编辑  收藏  举报