start

· JAVA/Thread
개요 JVM은 하나의 프로세스로 실행되고, 여러 개의 Thread를 실행할 수 있는 환경을 갖춥니다. 또 우리가 만든 자바 프로그램을 실행하고, main thread를 생성하고, 코드를 실행합니다. JAVA에서 Thread를 사용하는 대표적인 2가지 방법이 있습니다. Thread Class를 사용하는 방법과 Runnable Interface를 사용하는 방법이 바로 그것입니다. Thread 사용하기 public class Thread { public static void main(String[] args) { Thread thread1 = new ExampleThread(); Thread thread2 = new Thread(new ExampleRunnable()); thread1.start(); thre..
낭만주의 개발자
'start' 태그의 글 목록