class EjemploHilo4 implements Runnable { public void run() { System.out.println("Esto es otro hilo: " + Thread.currentThread()); } public static void main(String []args) { ThreadGroup tg = new ThreadGroup("fumador"); Thread eh3_1 = new Thread(tg, new EjemploHilo4(), "Ejemplo hilo 3 1"); Thread eh3_2 = new Thread(tg, new EjemploHilo4(), "Ejemplo hilo 3 2"); eh3_1.start(); eh3_2.start(); System.out.println("Estos un hilo " + Thread.currentThread()); } }