@Author : @Singularity
@create @2023/9/27 17:29
*/
public class Test {
public static void main(String[] args) {
List list = List.of("1", "2", "3");
list.add("4");
System.out.println(list); //输出多少?
List collect = Stream.of("1", "2", "3").collect(Collectors.toList());
list.add("4");
System.out.println(collect); //输出多少?
List stringList = Arrays.asList("1", "2", "3");
stringList.add("4");
System.out.println(stringList); //输出多少?
}
}