import java.io.File; import java.io.FileNotFoundException; import java.text.DecimalFormat; import java.util.Scanner; import uwcse.io.Input; public class FileInputExample { public static void main(String[] args) { // Create a Scanner to read the input file String fileName = new Input().readString("Input file name? "); System.out.println(); Scanner scan; try { scan = new Scanner(new File(fileName)); } catch (FileNotFoundException e) { System.out.println(fileName + " doesn't exist!"); return; } // Read the file and count the number of occurences of A, B, ... // Display the statistics (as an histogram) } }