title: Reading a .csv file using scanner
body: <p>I am working on a project that involves asking a user for their zip code. Using the zip code provided the program should loop through a <code>.csv</code> file to determine what city they live in. I can read the information in the <code>.csv</code> file but I have no idea how to loop through it to find a specific piece of information.</p>
  
  <pre><code>import java.util.Scanner;
  import java.io.*;
  
  public class DetermineCity {
  
  public static void main(String[] args) throws IOException {
  
      String zip = "99820,AK,ANGOON";
  
      Scanner keyboard = new Scanner(System.in);
  
      System.out.println("enter then name of a file");
      String filename = keyboard.nextLine();
  
      File file = new File(filename);
      Scanner inputFile = new Scanner(file);
      String line = inputFile.nextLine();
  
      System.out.println("The first line in the file is ");
      System.out.println(line);
      inputFile.close();
    }
  }
  </code></pre>