企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### 转换 * 方案一:构造方法or addAll() ``` ArrayList<String> arrayList = Arrays.asList(str); LinkedList<String> link = new LinkedList<>(arrayList); link.stream().forEach(System.err::println); ``` * 方案二: ``` ArrayList<String> arrayList = Arrays.asList(str); LinkedList<String> list = arrayList.stream().collect(Collectors.toCollection(LinkedList::new)); ``` * 方案三 ``` LinkedList<Object> linkedList = Lists.newLinkedList(); linkedList.addAll(new ArrayList<>()); ```