title: How to pick a random item from a arraylist in java?
body: <p>How can I pick a random item from a list of items in a array list, for example;</p>
  
  <pre><code>ArrayList&lt;Integer&gt;  mylist= new ArrayList&lt;Integer&gt;();
  mylist.add(19);
  mylist.add(154);
  mylist.add(112);
  mylist.add(15);
  mylist.add(112);
  </code></pre>
  
  <p>Currently, I am doing this but because I need to use this over and over again, is there a shorter way of do this?</p>
  
  <pre><code>Random random = new Random();
  Integer randomInt = lista.get(rand.nextInt(lista.size()));
  </code></pre>