run 메소드는 new Thread(){}.start(); 시 단 한 번 호출합니다.
보통 그안에 while 문을 이용해서 사용하지요
while문이 sleep없이 1초동안 몇번 돌아가나 확인 하고 싶으시다면 아래 코드로 확인하세욥
public class Main {
static int count = 0;
public static void main(String[] args) {
long end_time = System.currentTimeMillis() + 1000;
while(System.currentTimeMillis()<=end_time) {
count++;
}
System.out.println(count);
}
}
제 컴퓨터는 157715529 번 돌아가네요 컴터 성능에 따라 다를겁니다 아마