How to check if a date is after today java
<p>Im trying to check whether a date entered by the user is after todays date. Here is my code:</p>

<pre><code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
Date enteredDate = sdf.parse(date);
Date currentDate = new Date();
if(enteredDate.after(currentDate)){
</code></pre>

<p>Date is a variable with the user date in the format "2016/04/26". After doing some debugging i found that enteredDate and currentDate are null. Any ideas why this is?
Thanks</p>