title: User Input File Console/Command Line - Java
body: <p>Most examples out there on the web for inputting a file in Java refer to a fixed path:</p>
  
  <p><code>File file = new File("myfile.txt");</code></p>
  
  <p>What about a user input file from the console?  Let's say I want the user to enter a file:</p>
  
  <p><code>System.out.println("Enter a file to read: ");</code></p>
  
  <p>What options do I have (using as little code as possible) to read in a user specified file for processing.  Once I have the file, I can convert to string, etc...  I'm thinking it has to do with BufferedReader, Scanner, FileInputStream, DataInputStream, etc...  I'm just not sure how to use these in conjunction to get the most efficient method.</p>
  
  <p>I am a beginner, so I might well be missing something easy.  But I have been messing with this for a while now to no avail.</p>
  
  <p>Thanks in advance.</p>