Este

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

package hilos;

/**
*
* @author ALUMNO
*/
public class Hilos extends Thread {
private int num;
private char l;
Hilos(){
num=0;
}
public void run(){

for (int i = 1; i<=30;i++){


System.out.println(i);
}

}
Thread le= new Thread(){
public void run(){

}
};

Thread unidas = new Thread(){


public void run(){

}
};

public static void main(String[] args) {

for (int i = 1; i<=30;i++){

System.out.println(i);
}
for (int i = 1; i<=30;i++){
System.out.println((char)('a'+i));

try{
Thread.sleep(2000);

}catch(InterruptedException e){

for (int i = 1; i<=30;i++){


System.out.println((i+1));
System.out.println((char)('a'+i));
}
while (true){
try{
Thread.sleep(2000);
System.out.println();
}catch(InterruptedException e){

}
}

}
}

You might also like