Java Timestamp equals() MethodThe equals () method of Timestamp class returns a Boolean value true if this Timestamp object is equal to the given object or to the given Timestamp object . SyntaxParametersThe parameter 'ts' represents the Timestamp value or the object value to compare with. ReturnsThe equals() method of Timestamp class returns :
Example 1Test it NowOutput: Both values are unequal. Example 2Test it NowOutput: Expire Timespan : 2018-09-03 09:01:15.0 Today date : Sun Sep 02 20:48:37 IST 2018 oops!Your plan is about to expire or has expired Recharge fast.
Next TopicJava Timestamp
|