Find the Duration in Months between the contents in an Iterator
<p>Code:</p>

<pre><code>    Iterator&lt;String&gt; termIncomeKeys = termIncome.keySet().iterator();
    while(termIncomeKeys.hasNext()){
        String month = termIncomeKeys.next();
        System.out.println(month);
    }
</code></pre>

<p>The month is printed as </p>

<p>Jan(2012) - Jan(2012)</p>

<p>Feb(2012) - Mar(2012)</p>

<p>Apr(2012) - May(2012)</p>

<p>Jun(2012) - Jun(2012)</p>

<p>Jul(2012) - Oct(2012)</p>

<p>What I want to achieve is I want to print the duration in terms of months between each of the entries. That is, Duration between first entry is 1 month, duration between second is 2 and so on.</p>
