Stream.of(int[])返回Stream<int[]>,而Stream.of(String[]) 返回Stream<String>。為什么這兩種方法的行為不同??jī)烧叨紤?yīng)該返回 Stream<int>andStream<String>或Stream<int[]>and Stream<String[]>。static int intArr[] = { 1, 2, 3, 4, 5 }; static String stringArr[] = { "3", "6", "8","14", "15" }; Stream<int[]> stream = Stream.of(intArr);Stream<String> stream1 = Stream.of(stringArr);
Stream.of(int[]) 返回 Stream<int[]> 而 Stream.of
炎炎設(shè)計(jì)
2022-12-15 15:24:34