title: Read multiple lines from console and store it in array list in Java?
body: <p>Can anyone please help me with the code as how to read multiple lines from console and store it in array list?
  Example, my input from the console is:</p>
  
  <pre><code>12     abc      place1
  13     xyz      place2
  </code></pre>
  
  <p>and I need this data in ArrayList.</p>
  
  <p>So far I tried this code:</p>
  
  <pre><code>Scanner scanner = new Scanner(System.in);
  ArrayList informationList = new ArrayList&lt;ArrayList&gt;();
  String information = "";
  int blockSize = 0, count = 1;
  System.out.println("Enter block size");
  blockSize = scanner.nextInt();
  System.out.println("Enter the Information ");
  while (scanner.hasNext() &amp;&amp; blockSize &gt;= count) {
      scanner.useDelimiter("\t");
      information = scanner.nextLine();
      informationList.add(information);
      count++;
  }
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Input line from console is mix of string and integer </p>