Skip to content

Instantly share code, notes, and snippets.

@Raouf25
Created April 3, 2020 10:46
Show Gist options
  • Save Raouf25/5af5292cfc93ddda3426623b2266d2bb to your computer and use it in GitHub Desktop.
Save Raouf25/5af5292cfc93ddda3426623b2266d2bb to your computer and use it in GitHub Desktop.
// Use the City's constructor method reference to create
// a two-parameter constructor reference.
BiFunction<String, String, City> twoParameterConstructor = City::new;
City dc = twoParameterConstructor.apply("Washington, D.C.", "DC");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment