1.

Which of these is a method of class Date which is used to search whether object contains a date before the specified date?(a) after()(b) contains()(c) before()(d) compareTo()I had been asked this question during an internship interview.This question is from Java.util topic in division java.util – The Collections Framework of Java

Answer»

Right option is (C) before()

Explanation: before() returns TRUE if the invoking Date object CONTAINS a date that is EARLIER than one specified by date, otherwise it returns FALSE.



Discussion

No Comment Found

Related InterviewSolutions