Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ashigeru
Created July 26, 2017 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashigeru/ec3fe33b60c5ba1c3c6352c53ec6ec80 to your computer and use it in GitHub Desktop.
Save ashigeru/ec3fe33b60c5ba1c3c6352c53ec6ec80 to your computer and use it in GitHub Desktop.
method reference w/ capturing left terms
public class MRC {
public static void main(String[] args) {
Supplier<Integer> s = new AtomicInteger()::incrementAndGet;
System.out.println(s.get());
System.out.println(s.get());
System.out.println(s.get());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment