package threadPer; class ThreadPer implements Runnable{ char c; int delay = 10000 ;//(int)(Math.random()*10); ThreadPer(char c) { this.c = c; } public void run() { try{ for ( int k = 0; k < 20; k++) { System.out.println ( "Je crée un objet " + k ); Thread.sleep ( delay );}} catch( InterruptedException e ) { System.out.println("Interrupted Exception caught"); } } public static void main(String[] args) { ThreadPer tp = new ThreadPer('b'); new Thread(tp).start(); } }