自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 求两个时间相差的时长

问题描述实现思路问题描述问题:求两个时间相差的时长0年0月1日0时10分0秒实现思路public class Test { public static void main(String[] args) { Date date1 = new Date(1653394362000L); Date date2 = new Date(1653481362000L); System.out.println(getTimeDiffSt

2022-05-25 09:41:24 327 2

原创 可变参数是否可以不传参

问题描述实现思路问题描述问题:可变参数不传参数是否会导致空指针。20实现思路public class Test { public static void main(String[] args) { count(1, 2); count(); } public static int count(int... is) { int sum = 0; System.out.println(is.

2022-04-27 16:54:07 368 1

原创 Stream API根据对象的某个属性分组

1.目标[Person(code=1, name=zhangsan, age=10), Person(code=2, name=lisi, age=20), Person(code=1, name=wangwu, age=20)]{1=[Person(code=1, name=zhangsan, age=10), Person(code=1, name=wangwu, age=20)], 2=[Person(code=2, name=lisi, age=20)]}2.实现import l.

2022-04-27 16:05:42 1274

原创 Stream API根据某个对象的属性去重

1.目标// 根据Student对象的code属性去重[Student(code=1, name=zhangsan, age=10), Student(code=2, name=lisi, age=20), Student(code=1, name=wangwu, age=20)][Student(code=1, name=zhangsan, age=10), Student(code=2, name=lisi, age=20)]2.代码import lombok.AllArgsCons

2022-04-27 16:00:11 296

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除