TheRealL

Untitled

Nov 21st, 2011
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1.     public static int antallVerb(String filNavn) {
  2.         int antallVerb = 0;
  3.        
  4.         boolean correctInput = false;
  5.         while (!correctInput)
  6.             try {
  7.                 System.out.print("\nOppgi antall verb: ");
  8.                 antallVerb = konsoll.nextInt();
  9.                 correctInput = true;
  10.             } catch (InputMismatchException e) {
  11.                 System.out.println("Du må oppgi et tall mellom 1 og 88");
  12.             }
  13.        
  14.         return antallVerb;
  15.     }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment