title: Importing data from a large file into a 2d Array
body: <p>I am trying to import a large data file and insert the information into a 2D array. The file has around 19,000 lines, and consists of 5 columns. My code is absolutely correct, there are no run time errors nor exceptions. Though, the problem is that when I try to print out data[15000][0], it says null. but my line does have 15,000 lines and it should print out the element inside the array. But when I print out data[5000][0], it works. What could possibly be wrong?  I have 19,000 cities in 19,000 different lines, but it seems like when It goes around 10,000+ nothing gets stored in the 2d array. Help please</p>
  
  <pre><code> import java.io.BufferedReader;
   import java.io.FileReader;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  
  
  
   public class Data1
  {
      public static void main(String[] args)
  {
      try{
        FileReader file = new FileReader("/Users/admin/Desktop/population.csv");
        BufferedReader in = new BufferedReader(file);
  
          String title = in.readLine();
          String[][] data = new String[20000][5];
          int currentRow = 0;
          String current;
  
  
          int i = 0;
         String temp;
         while ((temp = in.readLine()) !=null)
          {
              String[]  c = new String[5];
              String line = in.readLine().replaceAll("\"", "");  //changing the format of the data input 
              c = line.split(",");
              c[1] = c[1].replace(" ", "");
  
  
            for (int j = 0; j &lt;data[0].length; j++)
              {
                  current = c[j];
                  data[i][j] = c[j];
  
              }
  
              i++;
           }
  
           System.out.println(data[15000][0]);
  
      }
           catch (FileNotFoundException ex)
          {
              ex.printStackTrace();
          }
          catch (IOException ex)
          {
              ex.printStackTrace();
          }
          catch (Exception ex)
          {
              ex.printStackTrace();
          }
      }
  }
  </code></pre>