
笔记的都是需要背诵的零散知识点,以顺序的方式组织
(1)toString返回数组的字符串
(2)sort排序
(3)copyof
(4)fill数组元素的填充
(5)binarySearch二分搜索查找
(6)equals
(7)asList将一组值换成list
(1)exit退出当前程序
(2)arraycopy:复制数组元素,比较适合底层调用,一般使用Arrays.copyOf完成复制数组
(3)currentTimeMillens;返回当前时间距离1970-1-1的毫秒数
(4)gc:运行垃圾回收机制System.gc();
(1)介绍
第三代日期类
(1)使用 now() 返回表示当前日期时间的 对象
(2)使用 DateTimeFormatter 对象来进行格式化
(3)创建 DateTimeFormatter 对象
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(“yyyy-MM-dd HH:mm:ss”);
String format = dateTimeFormatter.format(ldt);
(4)LocalDate now = LocalDate.now(); //可以获取年月日
(5)提供 plus 和 minus 方法可以对当前时间进行加或者减
(6)//看看 890 天后,是什么时候 把 年月日-时分秒
LocalDateTime localDateTime = ldt.plusDays(890);
System.out.println(“890 天后=” + dateTimeFormatter.format(localDateTime));
6、Instant时间戳