摘要: 作用 这个List中只能存放一个元素,多一个或者少一个都会导致异常。 使用方法 String str = "this is my str test"; // 这个时候myList这个列表中就只能存放一个元素 List<String> myList = Collections.singletonLis 阅读全文
posted @ 2022-10-17 10:16 一刹流云散 阅读(395) 评论(0) 推荐(0) 编辑