title: How to get last day of the month for the given date
body: <p>I have a given date:</p>
  
  <pre><code>01/10/2017(mm/dd/yyyy)
  
  Calendar c = c.getInstance();
  
  c.setTime(date);
  </code></pre>
  
  <p>Now to point to the last day of the month I am using the following code:</p>
  
  <pre><code>c.set(Calendar.Date, c.getActualMaximum(Calendar.Date));
  </code></pre>
  
  <blockquote>
    <p>Expected Output : 01/31/2017</p>
    
    <p>Original Output : 02/01/2017</p>
  </blockquote>
  
  <p>I am not getting the expected output. Its returning me the first day of next month. </p>
  
  <p>Can anyone please help me?</p>