view src/main/java/jp/ac/u_ryukyu/treevnc/test/ThreadTest.java @ 11:57ae9fbb1245

add files
author Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
date Tue, 21 Aug 2012 14:02:05 +0900
parents
children b0c7fad4c695
line wrap: on
line source

package jp.ac.u_ryukyu.treevnc.test;

public class ThreadTest {
	// exit(0) forces other threads 
	// if there is no exit(0), main routine wait to join other threads implicitly.  
	public static void main(String[] args) {
		Thread th = new Thread(new Runnable(){
			@Override
			public void run() {
				for(int i = 0;i < 10; ) {
					
				}				
			}
		
		});
		th.start();
		System.exit(0);
	}
}