I have a given date:

```
01/10/2017(mm/dd/yyyy)

Calendar c = c.getInstance();

c.setTime(date);

```

Now to point to the last day of the month I am using the following code:

```
c.set(Calendar.Date, c.getActualMaximum(Calendar.Date));

```

> 
> Expected Output : 01/31/2017
> 
> 
> Original Output : 02/01/2017
> 
> 
> 

I am not getting the expected output. Its returning me the first day of next month. 

Can anyone please help me?