title: Inputting integers into an arraylist
body: <p>If I have a line of integers in a text file in the following format: 
  [3, 3, 5, 0, 0]
  how can I go about adding the integers into an arraylist?
  I have this, but it isn't working:</p>
  
  <pre><code>while (input.hasNextInt())
  
  {
      int tempInt = input.nextInt();
      rtemp.add(tempInt);
  }       
  </code></pre>
  
  <p>How do I deal with the commas and the brackets?</p>