null

System.out.println(Optional.ofNullable(list.get(1)).map(TarKol::getId).orElse(1));

posted @ 2023-07-04 13:25  Arborblog  阅读(4)  评论(0编辑  收藏  举报