title: get last record from list in freemarker
body: <pre><code>    &lt;select name="showYears"&gt;
              &lt;#list payrollYears as year&gt; 
                  &lt;option value="${year.year}"&gt;${year.yeardesc}&lt;/option&gt;
              &lt;/#list&gt;        
      &lt;/select&gt;
  </code></pre>
  
  <p>i am getting payrollyears list from my controller and i am iterating the list in freemarker and adding value to select box i want my last value of list should be selected value in last how can i do that </p>