title: In Java, how can I read a text file consisting of "word<space>number<space>number"?
body: <p>I have a text file with these type of values (an example):</p>
  
  <pre><code>5 Dog 23 45 Cat 97 23 Mouse 13 23 Bird 10 23 Dog 99 18
  </code></pre>
  
  <p>The first digit '5' is the total number of array objects that I need to tokenize. I want it so that when I tokenize the text file, it ignores '5' then reads them as:</p>
  
  <pre><code>Dog 23 45
  Cat 97 23
  Mouse 13 23
  Bird 10 23
  Dog 99 18
  </code></pre>
  
  <p>and then put all the same objects together in an array. So for example the dog arraylist would have:</p>
  
  <pre><code>Dog 23 45
  Dog 99 18
  </code></pre>
  
  <p>I just want to know how I can tokenize a word followed by two numbers with spaces. Any kind of help would be greatly appreciated.</p>