title: Why do I keep getting 138 when I ask for how many times this word appears
body: <p>I am trying to find how many times a state appears in an one column csv file. It also only prints half of the states. My code is below</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.io.FileReader;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Arrays;
  
  public class csvtxt {
  
     public static void main(String a[]){
        StringBuilder sb = new StringBuilder();
        String strLine = "";
        List&lt;String&gt; list = new ArrayList&lt;String&gt;();
        try {
           BufferedReader br = new BufferedReader(new FileReader("C:\\Users\\dbb38\\Downloads\\customers_export_111 - customers_export_1 (1).csv"));
           while (strLine != null)
           {
              strLine = br.readLine();
              sb.append(strLine);
              sb.append(System.lineSeparator());
              strLine = br.readLine();
              if (strLine==null)
                 break;
              list.add(strLine);
           }
           //
           String wordToSearchFor = "Alabama";
           int Alabama = 0;
           for(String Alabama1 : list)
           {
              if(Alabama1.equals(wordToSearchFor)) 
              {
                 Alabama++;
              }
           }
           System.out.println("Alabama = " + "["+ Alabama +"]");
           //
           String wordToSearchFor1 = "Alaska";
           int Alaska = 0;
           for(String Alaska1 : list)
           {
              if(Alaska1.equals(wordToSearchFor)) 
              {
                 Alaska++;
              }
           }
           System.out.println("Alaska = " + "["+ Alaska +"]");
           //
           String wordToSearchFor2 = "Arizona";
           int Arizona = 0;
           for(String Arizona1 : list)
           {
              if(Arizona1.equals(wordToSearchFor)) 
              {
                 Arizona++;
              }
           }
           System.out.println("Arizona = " + "["+ Arizona +"]");
           //
           System.out.println(Arrays.toString(list.toArray()));
           br.close();
        } catch (FileNotFoundException e) {
           System.err.println("File not found");
        } catch (IOException e) {
           System.err.println("Unable to read the file.");
        }
     }
  }
  </code></pre>
  
  <p>Here is the output i'm getting. I cut off some of the output because 95881 is too many charaters.</p>
  
  <pre><code>Alabama = [138]
  Alaska = [138]
  Arizona = [138]
  [ South Dakota, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Tennessee, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Texas, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Utah, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Vermont, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia, Virginia]
  </code></pre>
  
  <p>There is supposed to be 35 Vermont's but it only prints 17 of them. Any help would be appreciated!a</p>