Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package punto_04;
- public class Hilo_p4 extends Thread {
- private char letra;
- public Hilo_p4(String nombreHilo, char letra) {
- super(nombreHilo);
- this.letra = letra;
- }
- public void run() {
- for (int i = 0; i < 10; i++) {
- System.out.println(this.letra + "_" + getName());
- Thread.yield();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement