Menu



Manage

Cord > Study_JAVA 전체 다운로드
파일 목록
Study_JAVA > 13/BeepTaskEx2.java Lines 26 | 506 바이트
다운로드

                        package week13;

public class BeepTaskEx2 {
	public static void main(String[] args)throws InterruptedException {
		Thread thread = new Thread(new Runnable() {
			
			@Override
			public void run() {
					for (int i =0; i<5; i++) {
						System.out.println("Pii~");
						try{Thread.sleep(1000);
						} catch (InterruptedException e) {
					}
				}
				
			}
		});
		thread.start();
		
		for (int i = 0; i<5 ; i++) {
			System.out.println("*****");
			Thread.sleep(1000);
		}
	}
}