thread class method1 70.Thread 클래스의 여러 메서드들 Thread 우선순위 - Thread.MIN_PRIORITY(=1) ~ Thread.MAX_PRIORITY(=10) - 디폴트 우선순위 : Thread.NORMAL_PRIORITY(=5) - 우선순위가 높은 Thread가 CPU의 배분을 받을 확률이 높다 - setPriority()/getPriority() - Thread 우선순위 예제 - PriorityTest.java class PriorityThread extends Thread{ public void run() { int sum = 0; Thread t = Thread.currentThread(); System.out.println(t+"start"); for(int i = 0; i 2022. 6. 7. 이전 1 다음