Java Date before() MethodThe before() method of Java Date class tests whether the date is before the specified date or not. Syntax:Parameterswhen - a date ReturnIt returns a Boolean value. It will return true if this date is before the specified date otherwise false. ExceptionNullPointerException will be thrown if when is null. Example 1Test it NowOutput: Date 'd' is before Date 'd2' : true Example 2Test it NowOutput: Date 'd' is before Date 'd2' : false Next Topicjava.util.Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India