public boolean await ( ) { System . out . format ( "%n%s (y/n): " , label ) . flush ( ) ; final Scanner in = new Scanner ( System . in ) ; final String line = in . nextLine ( ) ; return "y" . equalsIgnoreCase ( line ) ; }
Await for input that matches the provided command .