Javatpoint Logo
Javatpoint Logo

Java Timestamp after() Method

The after() method of Java Timestamp class returns Boolean value true if this Timestamp object is later than given Timestamp object.

Syntax

Parameters

The parameter 'ts' represents the Timestamp to compare with.

Returns

The after() method of Timestamp class returns :

  • Boolean value true if this Timestamp object is later than given Timestamp object.
  • Else it returns false.

Example 1

Test it Now

Output:

Boolean value returned : false

Example 2

Test it Now

Output:

Reema is younger than Geetanjali
Next TopicJava Timestamp




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials