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