title: Iterator java nested loop
body: <p>I've a question: there is a way to increment an iterator directly into nested loop?
  Example</p>
  
  <pre><code>while(budgets.iterator().hasNext()){
      if(budgets.iterator().next().getTipoBudget()!="I"){
          if(budgets.size()&lt;maxInviate){
              for(i=0; i&lt;maxInviate ;i++){
                  if(budgetArray[i]==0 &amp;&amp; budgets.iterator().hasNext()){
                      budgetArray[i] = budgets.iterator().next().getBudgetField();
  
                  }
              }
              i=0;
              Set budgetSet = new HashSet&lt;Integer&gt;(Arrays.asList(budgetArray));
              Integer min = Collections.min(budgetSet);
              valueAdw = valueAdw + min;
              for(i=0; i&lt;maxInviate; i++){
                  budgetArray[i] = budgetArray[i] - valueAdw;
              }
          }else{
              valueAdw = null;
              valueAdwEnd = null;
              campaigns.addLast(new Campaign(valueAdw, valueAdwEnd, (long) adwordsBudget.getZona().getAdwordsCode()));
          }
      }
  }
  </code></pre>