zoukankan      html  css  js  c++  java
  • 考试第五题

    package test05;
    
    import java.text.SimpleDateFormat;
    import java.util.Date;
    
    public class Demo implements Runnable{
    
        @Override
        public void run() {
            // TODO Auto-generated method stub
            
            Date date = new Date();
            
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss");
        
            String s = simpleDateFormat.format(date);
            System.out.println(s);
        }
        public static void main(String[] args) {
            Demo d = new Demo();
            
            while(true) {
                
                Thread t = new Thread(d);
                try {
                    t.sleep(1000);
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                t.start();
                
            }
            
        }
        
    
    }

  • 相关阅读:
    Emacs教程
    华为上机测试 2015
    奇偶排序
    C语言中的EOF和回车不一样
    jquery 使用方法
    1116
    1115
    1109
    Oracle14~23
    get与post的区别
  • 原文地址:https://www.cnblogs.com/bichen-01/p/11336301.html
Copyright © 2011-2022 走看看