title: Java ArrayList, taking user input of multiple types(int, String etc.) in one line
body: <p>I'm working on getting a little better at Java, and a problem I've run into is taking user input, all in one line like this:</p>
  
  <pre><code>System.out.println("Please input numbers that you would like to work with");
  
      //Read in user input into ArrayList, taking into account that they may input Strings or anything else.
  </code></pre>
  
  <p>Assuming the user inputs something like this</p>
  
  <p>1, 2, 4, 257, dog, rabbit, 7, #</p>
  
  <p>or even</p>
  
  <p>1 2 4 257 dog rabbit 7 #</p>
  
  <p>I've seen in several places how to read in one input at a time, but I wasn't sure of the best way to read in a dynamic ArrayList all at once.</p>
  
  <p>I'm not really concerned with the difference in doing it with commas or without commas since logically I think I know how to do that, and haven't tried yet, so really the main problem is as stated above (reading user input into ArrayList of dynamic size when user inputs all numbers at once).  Thanks, and I'm not necessarily looking for code, this isn't homework, just wondering best way to do this.  Just stating logically how it's done will work, but code is appreciated.</p>