容器与数组的转换
數組轉List
String[] str = new String[]{"AA", "BB", "CC"};
List list = Arrays.asList(str);
List轉數組
Object[] result = list.toArray();Set轉List
List<String> result = new ArrayList<>(set);總結
- 上一篇: 缓冲的注解
- 下一篇: @Cacheable原理