-
Which of these is a method of class Date which is used to search whether object contains a date before the specified date?
-
- compareTo()
- contains()
- after()
- before()
- NA
Correct Option: D
before() returns true if the invoking Date object contains a date that is earlier than one specified by date, otherwise it returns false.