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: 
use compareto method to compare two dates. 
check here in [Date API](http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Date.html)

```
if(curreDate.compareTo(thisdate)>0) {
// do your logic
}

```
```
if(endDate.after(new Date())){}

```

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