
public class SingleThreada implements Runnable {

		@Override
	public void run() {
		for (int i=0; i<5; i++) {
			try {
				Thread.sleep(200);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				System.out.println("exception caught");
			}
	
			System.out.println("   thread" + i);
		}
	}
	
	public static void main(String[] args) {
		(new Thread (new SingleThreada())).start();
		
		for (int i=0; i<4; i++) {
			try {
				Thread.sleep(300);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			System.out.println("main " + i);
			}
	}
}
	
