title: Accepting and sorting unlimited user input
body: <p>I have only started learning java a few days ago, and this is the first language that I am trying to learn. So please, excuse my ignorance.</p>
  
  <p>I am trying to create a class to accept <em>unlimited</em> user input (in the form of integers 5, 10, 15, 500, 10003, etc.) Then, stop accepting input when the user writes "Ok" into the command line.  Then receive a prompt asking for ascending or descending. Finally, print the list of numbers in ascending or descending order, according to the user's choice. </p>
  
  <p>I did not think it would be too hard to code. However, I am running into a few problems:</p>
  
  <ol>
  <li><p>I am trying to use the scanner to accept user input and place it in an <code>ArrayList</code> .... However, the <code>ArrayList</code> will only accept one type of variable (I need to place all integer inputs in the <code>ArrayList</code> and display results when the string "OK" is written).</p></li>
  <li><p>I do not know how to print an <code>ArrayList</code> so that the numbers will display on one line each in ascending or descending order.</p></li>
  </ol>
  
  <p>If anyone could write me an example code or point me in the right direction, that would be much appreciated.</p>