public int selectOption(int maxRange, String sourceType) throws IOException { do { try { userInput = input.nextInt(); }//end try catch(Exception e) { validInput=false; input.next(); }//end catch if (userInput<1 || userInput>maxRange) { MovieHouse.clearScreen(); System.out.println("Select from the options only!"); loadHeader(); if(sourceType.equals("main")) MovieHouse.homeMenu(); else if(sourceType.equals("movie menu")) loadMovieMenu(); }//end if }while(userInput<1 || userInput>maxRange || validInput==false); return userInput; }//end selectOption
boolean
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)