Question: I have a date [format - dd/mm/yyyy]. I need to compare it with the current date so that I can execute this logic 

```
if(end date is in the future) {
//logic
} else {
//logic
} 

```

Can we do this in JAVA ?

Answer: 
In general, use [Joda Time](http://joda-time.sourceforge.net/):

```
DateTime.parse("...").isAfterNow();

```

You will probably want to pass an appropriate `DateTimeFormatter`, such as `DateTimeFormat.forPattern("d/M/y")`, as the second parameter.
```
if(endDate.after(new Date())){}

```

just compare to a new Date it will be created a date time of now.