Creazione di threads stile 1: esempio il thread
public class MioThread extends Thread {
System.out.println ("Thread run" +
Thread.currentThread ( ));
for (int i = 0; i < 5; i++) {
try {Thread.currentThread ( ).sleep (1000); }
catch (InterruptedException e) { } }
System.out.println ("Fine run");} }