Skip to content

Commit f6721d6

Browse files
authored
Update Java_函数式编程.md
1 parent f123823 commit f6721d6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

notes/Java_函数式编程.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,22 @@ JDK 1.8 中另一个大的改进是引入了流,通过流、Lamda 表达式以
206206
使用静态方法 `Stream.of()` 由指定的值进行创建:
207207

208208
```java
209-
Stream<String> stream = Stream.of("a", "b ", "c", "d");
209+
Stream<String> stream = Stream.of("a", "b", "c", "d");
210210
```
211211

212212
**2. 由集合或数组创建**
213213

214214
使用静态方法 `Arrays.stream()` 由指定的数组进行创建:
215215

216216
```java
217-
String[] strings={"a", "b ", "c", "d"};
217+
String[] strings={"a", "b", "c", "d"};
218218
Stream<String> stream = Arrays.stream(strings);
219219
```
220220

221221
调用集合类的 `stream()` 方法进行创建:
222222

223223
```shell
224-
List<String> strings = Arrays.asList("a", "b ", "c", "d");
224+
List<String> strings = Arrays.asList("a", "b", "c", "d");
225225
Stream<String> stream = strings.stream();
226226
```
227227

0 commit comments

Comments
 (0)