Stop show with sound  Next slide in show -- Keyboard shortcut: 'n'  1 minute, 31 secondsLecture 10 - slide 20 : 26
Program 4
class FinallyContinue {

  public static void main(String[] args){

    int i = 0;

    while (i < 10){
      try{
        i = i + 1;
        System.out.println("Gentagelse for i = " + i);
        if (even(i)) continue;
        System.out.println("Løkke beregninger med i = " + i);
      }
      finally{
        System.out.println("Løkkeafslutning med i = " + i);
      } // end try
    }
    System.out.println("Løkken slut");
  }

  public static boolean even(int i){
   return (i % 2 == 0);
  }

}