class RunnableImpl implements Runnable{ public void run(){ for (int i = 0;i < 10; i++) { System.out.println("Runnable-->" + i); } }}
class Test{ public static void main(String [] args){ RunnableImpl ri = new RunnableImpl(); Thread t = new Thread(ri); t.start(); for (int i = 0; i < 10; i++) { System.out.println("main-->" + i); } }}