title: How to show to date while using before for java.util.Date.before
body: <p>I need your help in getting the value of the to date while retrieving the list of the months which are between two dates.</p>
  
  <p>In my Code I am using:</p>
  
  <pre><code>String date1 = "JAN-2015";
  String date2 = "APR-2015";
  
  DateFormat formater = new SimpleDateFormat("MMM-yyyy");
  
  Calendar beginCalendar = Calendar.getInstance();
  Calendar finishCalendar = Calendar.getInstance();
  try {
    beginCalendar.setTime(formater.parse(date1));
    finishCalendar.setTime(formater.parse(date2));
   } catch (ParseException e) {
       e.printStackTrace();
   }
  while (beginCalendar.before(finishCalendar)) {
  String date =     formater.format(beginCalendar.getTime()).toUpperCase();
  beginCalendar.add(Calendar.MONTH, 1);
     }
  </code></pre>
  
  <p>The above code will show the list:</p>
  
  <pre><code>Jan-2015
  Feb-2015
  Mar-2015
  </code></pre>
  
  <p>So how can I add also the to date which is <code>Apr-2015</code> to it as it is performing the <code>.before()</code></p>