Home » JAVA Programming » Collections » Question
  1. Which of these is a method of class Date which is used to search whether object contains a date before the specified date?
    1. compareTo()
    2. contains()
    3. after()
    4. before()
    5. 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.



Your comments will be displayed only after manual approval.