title: How to prompt a user for a file in java using Scanner?
body: <p>I need to know how to prompt user for a file and then be able to use the file in my program. Here is my unsuccessful attempt.</p>
  
  <pre><code>public static void main(String[] args) {
  Scanner Scanscan = new Scanner(System.in);
  System.out.print("Input filename:");
  String filename = Scanscan.nextLine();
  File inputFile = new File(filename);
  Scanner reader = new Scanner(inputFile);
  </code></pre>
  
  <p>I get a "File not found exception" when I try it.</p>