Code/JAVA

개굴님의 매초당 출력+_+ 문제... 나름 해결한것 ...

알 수 없는 사용자 2007. 5. 16. 16:17

import java.util.*;

public class se {
 public static int b() {
    Date d = new Date();
   int b = d.getSeconds();
   return b++;
 }
 
 public static void main(String args[]) {
   Date f = new Date();
   System.out.println(new Date());
   int c = 0;
   
   while(true){
       int a = b();
      
        if(a >= c && a != 0){
         System.out.println(b());
     
         if(c == 0 || a > c || a == c){
          c = a + 1;
         }
        } else if(a == 0 &&  c == 60) {
         System.out.println(b());
         c = 0;
        }
   }
  }
}