Created
April 3, 2020 10:30
-
-
Save Raouf25/a09b37b5f910a53ae4a0e207142ec4db to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Use the City's method references and assign them to biconsumers | |
BiConsumer<City, String> setNameBiConsumer = City::setName; | |
BiConsumer<City, String> setCodeBiConsumer = City::setCode; | |
City ny = new City(); | |
setNameBiConsumer.accept(ny, "New York"); | |
setCodeBiConsumer.accept(ny, "NY"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment