title: Get a list outside a loop
body: <p>I need to get a list from another list so here is what I have done :</p>
  
  <pre><code>ArrayList&lt;String&gt; userList = user.getListSalarieByManager(login);
  ArrayList&lt;DHDemande&gt; demandesList;
  for (int i = 0; i &lt; userList.size(); i++) {
      demandesList = d.getDemandesForManager(userList.get(i));
  }
  </code></pre>
  
  <p>Then I need to get the data from the list <code>demandesList</code> but I can't get this list outside the loop because <em>this not have been initialized</em>. </p>
  
  <p>How can I get the data from the list inside the loop ?</p>