title: creating multiple arraylists from a file in java
body: <p>i am new to java so i need help...
  i have a file which contains:-</p>
  
  <pre><code>Model
  A
  T
  ENMDL
  Model
  A
  T
  ENMDL
  </code></pre>
  
  <p>.... repeat multiple times and i need to make a program which separate them and store them in different arraylists.
  can anyone help..</p>
  
  <pre><code>public ArrayList&lt;String&gt;  GetAllFile(String File) throws IOException
          {
              FileReader fr=new FileReader(File);
              BufferedReader br=new BufferedReader(fr);
              String rowData;
              ArrayList&lt;String&gt; allFile = new ArrayList&lt;String&gt;();
  
              while((rowData=br.readLine())!=null)
                  if(rowData.startsWith("MODEL"))
                  allFile.add(rowData);
  
  
              fr.close();
  
              return allFile; 
  
          }
          }
  </code></pre>