package com.javaex.thread.ex04; public class MainThread { public static void main(String[] args) { // ì°ë ë를 ë¶ë¬ì ì¤í // Thread thread = new DigitThread(); Thread thread = new Thread(new DigitThread()); Thread thread2 = new Thread(new AlphabetThread()); thread.setPriority(Thread.MAX_PRIORITY); //ì°ë ë ì°ì ìì ë¶ì¬. 1~10ê¹ì§. 10ì´ ì ì¼ ì°ì ììê° ëì. thread2.setPriority(Thread.MIN_PRIORITY); // ì°ë ëì ìì thread.start(); thread2.start(); // threadì thread2를 ë©ì¸ ì°ë ëì íë¦ì í©ë¥ try { thread.join(); thread2.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("ë©ì¸ì°ë ë ì¢ ë£"); } }