java8中首次出现Consumer接口,用于接收一个输入参数并处理,不返回任何值。
Represents an operation that accepts a single input argument and returns no result. Unlike most other functional interfaces, Consumer is expected to operate via side-effects.
时间: 2024-11-08 05:57:53
java8中首次出现Consumer接口,用于接收一个输入参数并处理,不返回任何值。
Represents an operation that accepts a single input argument and returns no result. Unlike most other functional interfaces, Consumer is expected to operate via side-effects.