/* NOTE that you need to create your own input.txt file for this to work */ import java.util.Scanner; import java.io.File; import java.io.IOException; public class ReadArrayAndSearch{ public static void main( String [] args ) throws IOException{ int number; int size = 0; int key; boolean again; boolean notFound; int location; File inputFile = new File( "input.txt" ); Scanner scan = new Scanner( inputFile ); if (scan.hasNext()){ size = scan.nextInt(); } int [] values = new int [size]; int i = 0; while ( scan.hasNext( ) ){ values[i] = scan.nextInt( ); i++; } Scanner keyboard = new Scanner(System.in); do { System.out.print("Please enter a number to search for: "); key = keyboard.nextInt(); notFound = true; for (location = 0; location