package com.threads;
class Bank extends Thread {
public synchronized void run() {
try {
interrupt();
this.sleep(5000);
}catch(InterruptedException e) {
System.out.println(interrupted());
}
}
}
public class Jcp425 {
public static void main(String[] args) {
new Bank().start();
}
}
|
|