Commit 0d2187ec authored by rawan's avatar rawan

step4

parent 5ce7a1bd
package hacker; package hacker;
public class PoliceThread { public class PoliceThread extends Thread{
public PoliceThread() {
this.setName(this.getClass().getSimpleName());
}
public void run() {
for (int i = 10; i >= 0; i--) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
//Prints the remaining time on the screen
System.out.println("Police arrive in " + i + " sec");
}
//
System.out.println(" Game over for you hackers");
System.exit(0);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment