当前位置:网站首页>LocalDate addition and subtraction operations and comparison size
LocalDate addition and subtraction operations and comparison size
2022-07-31 03:32:00 【UlricaQ】
LocalDate for addition and subtraction, code and results:
Code:
public void test() {LocalDate today = LocalDate.now();System.out.println("today:"+today);// today plus five daysLocalDate plusDays = today.plusDays(5);System.out.println("today plus 5 days: "+plusDays);// today minus 5 daysLocalDate minusDays = today.minusDays(5);System.out.println("today minus 5 days: "+minusDays);// Determine if today is before plusDays, return a boolean valueboolean before = today.isBefore(plusDays);System.out.println("Determine whether today is before plusDays: "+before);boolean after = today.isAfter(plusDays);System.out.println("Determine whether today is after plusDays: "+after);// Compare today and plusDays, the result returns the value of today-plusDaysint i = today.compareTo(plusDays);System.out.println("Today and plusDays compare the size: "+ i);}边栏推荐
- Why SocialFi achievement Web3 decentralized social in the future
- 【CocosCreator 3.5】CocosCreator 获取网络状态
- LeetCode simple problem to find the subsequence of length K with the largest sum
- LeetCode中等题之分数加减运算
- A brief introduction to the CheckBox component of the basic components of Flutter
- IDEA comment report red solution
- 下载jar包的好地方
- TCP详解(一)
- LeetCode每日一练 —— 138. 复制带随机指针的链表
- Detailed explanation of TCP (3)
猜你喜欢

数据库实现分布式锁

Getting Started with CefSharp - winform

MP使用时的几个常见报错

Ambiguous method call.both

Mysql 45 study notes (twenty-four) MYSQL master-slave consistency

浅识Flutter 基本组件之showDatePicker方法

type_traits元编程库学习

7年经验,功能测试工程师该如何一步步提升自己的能力呢?

Addition and Subtraction of Scores in LeetCode Medium Questions
![[Dynamic programming] Maximum sum of consecutive subarrays](/img/3d/10731cc64d1c69d2beb3666ae0f064.png)
[Dynamic programming] Maximum sum of consecutive subarrays
随机推荐
分布式锁以及实现方式三种
TCP详解(一)
Redis uses sorted set to cache latest comments
Day32 LeetCode
The els block moves the boundary to the right, and accelerates downward.
[Dynamic programming] Maximum sum of consecutive subarrays
How to develop a high-quality test case?
some of my own thoughts
注解用法含义
【编译原理】递归下降语法分析设计原理与实现
安全20220718
点云DBSCAN聚类(MATLAB,非内置函数)
Database implements distributed locks
[Godot][GDScript] 二维洞穴地图随机生成
Know the showTimePicker method of the basic components of Flutter
Mysql 45 study notes (23) How does MYSQL ensure that data is not lost
A brief introduction to the CheckBox component of the basic components of Flutter
Detailed explanation of TCP (1)
MultipartFile文件上传
安全20220712
