Javatime-instant-isbefore
提供:Dev Guides
java.time.Instant.isBefore()メソッドの例
説明
- java.time.Instant.isBefore(Instant otherInstant)*メソッドは、このインスタントが指定されたインスタントの前かどうかをチェックします。
宣言
以下は、* java.time.Instant.isBefore(Instant otherInstant)*メソッドの宣言です。
パラメーター
戻り値
このインスタントが指定されたインスタントの前にある場合はtrue。
例外
例
次の例は、java.time.Instant.isBefore(Instant otherInstant)メソッドの使用方法を示しています。
上記のプログラムをコンパイルして実行すると、次の結果が生成されます-