1,作用:
2,Stream流的操作步骤:
- 获取Stream流
- 中间方法;
- 总结方法;
3,集合的操作方法:
a,集合的Stream流获取:(注意 : map集合不能直接获取,要先获取键再获取流)
b,使用范例:
```java //list集合: ArrayListlist =new ArrayList<>(); Stream stream = list1.stream();
//map集合:先获取键:
HashMap
<a name="YFq6S"></a>
## 4,数组的操作方法:
<a name="G2tIq"></a>
### a,数组的Stream流获取:
![image.png](https://cdn.nlark.com/yuque/0/2022/png/25975946/1645171186978-06d89a7b-6105-4ce5-8aa7-3ab618740fbe.png#clientId=u59222616-007b-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=96&id=u77fa239c&margin=%5Bobject%20Object%5D&name=image.png&originHeight=96&originWidth=944&originalType=binary&ratio=1&rotation=0&showTitle=false&size=13402&status=done&style=none&taskId=u8991bbc3-252a-4b09-b5dc-02f4658b66d&title=&width=944)
<a name="CO1au"></a>
### b,使用范例:
```java
//数组:
String[] array={"da","daf","da"};
Stream.of(array);
//字符串,可变数据:
Stream<String> stream4 = Stream.of("da", "da");