/** * @param args * @author Goto */ public static void main(String[] args) throws Exception{ int count = 0;
Date date = new Date(System.currentTimeMillis()); while (count++ < 20) { Thread.sleep(500); date.setTime(System.currentTimeMillis()); System.out.println(date.toString()); }