Created
September 17, 2023 15:37
-
-
Save h-hub/8a7e9fc456b857ae59502509d94da205 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
static void clientCode2() { | |
Item user = findItem2("99").get(); | |
} | |
static Optional<Item> findItem2(String id) { | |
return Arrays.stream(users) | |
.filter(item -> item.id.equals(id)) | |
.findFirst(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment