import java.util.*; public class bombe implements Runnable { Kode kode; 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("BOOOM!"); System.exit(0); } }