public class Compteur extends Thread { private int cpt; /** * @see java.lang.Runnable#run() */ public void run() { for (int i = 0; i < 10000; i++) { System.out.println("thread : " + cpt + " = " + i); } } /** * * * */ public Compteur(int cpt) { this.cpt = cpt; } public static void main(String[] args) { new Compteur(1).start(); new Compteur(2).start(); } }