Created
November 23, 2019 07:19
-
-
Save yuizho/de2cffb514a774f32819c108934425e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stream<String> stream = | |
Arrays.asList("a", "b", "c").stream() | |
.filter(s -> !s.equals("a")); | |
System.out.println(stream.collect(Collectors.toList())) | |
// ココでエラーになる | |
// java.lang.IllegalStateException: stream has already been operated upon or closed | |
System.out.println(stream.collect(Collectors.toList())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment