Java Date after() MethodThe after() method of Java Date class tests whether the date is after the specified date or not. Syntax:Parameterswhen - a date ReturnIt returns a Boolean value true if this date is after the specified date. Otherwise, returns false. ExceptionNullPointerException will be thrown if when is null. Example 1Test it NowOutput: Date 'd' is after Date 'd2' : true Example 2Test it NowOutput: Date 'd' is after Date 'd2' : false
Next Topicjava.util.Date
|