title: Iterating over Java Lists - how do I recognise the final element?
body: <p>I have a List for example </p>
  
  <pre><code>{ "in" , "out", "rec", "auth" } 
  </code></pre>
  
  <p>... but the content of the list is not predictable.</p>
  
  <p>When iterating the list list how can we know we have reached last element? 
  I want to apply different logic for the last element.</p>