Java Date equals() MethodThe equals() method of Java Date class returns a Boolean value on the basis of compression between two dates for equality. This method overrides equals in class Object Syntax:Parametersobj - an object to be compared ReturnIt returns true if the objects are same otherwise false. Example 1Test it NowOutput: Date 'd' equals Date 'd1' : false Example 2Test it NowOutput: Date 'd' equals Date 'd1' : true
Next Topicjava.util.Date
|