Thread 와 Runnable
자바 5 이전
Thread
스레드를 생성하는 방법
public class ThreadExample extends Thread{
@Override
public void run() {
System.out.println("스레드 예시 실행");
}
}
...
ThreadExample thread = new ThreadExample();
thread.start();
start() 메서드를 호출하면 JVM 에서 일어나는 과정
1
2
3
4
5
6
주요 특징
Runnable
스레드를 생성하는 방법
Thread 와 Runnable 의 한계
Last updated