title: Java get last element of a collection
body: <p>I have a collection, I want to get the last element of the collection. What's the most straighforward and fast way to do so?</p>
  
  <p>One solution is to first toArray(), and then return the last element of the array. Is there any other better ones?</p>