// find sum // reprompt user for input public class reprompt { public static void main(String[] args) { TokenReader in = new TokenReader(System.in); int val, sum; boolean test; // Prompt for initial input: reprompt if outside range test = false; while(!test) { System.out.print("Enter an integer between 0 and 10, inclusive: "); val = in.readInt(); if (val > 10 || val < 0 ) { System.out.println("What? Pay attention fool!"); test = false; } else { System.out.println("Thanks for following instructions."); test = true; } } } }