import java.util.Scanner; public class Bombe implements Runnable{ int i = 5; public Bombe(Kode k) { System.out.println("Legg inn armeringskode: "); k.addCode(new Scanner(System.in).nextLine()); } @Override public void run() { while (i > 0) { System.out.println(i); i--; try { Thread.sleep(1000); } catch (InterruptedException e) { return; } } System.out.println("BOOM!"); System.exit(0); } }