Implémentez Runnable au lieu d'étendre Thread.
public static class ICRunnable implements Runnable {
public void run() {
System.out.println( System.currentTimeMillis() );
}
}
public static void main( String[] args ) {
(new Thread( new ICRunnable() )).start();
}
|
|