Skip to content

Instantly share code, notes, and snippets.

View k4zy's full-sized avatar

Kazuki Yoshida k4zy

  • Cookpad.Inc
  • Yebisu/Tokyo
View GitHub Profile
@JakeWharton
JakeWharton / Java6.java
Last active May 28, 2022 16:14
A comparison between non-capturing and capturing expressions across Java 6, Java 8, Java 8 with Retrolambda, Kotlin with native function expressions, and Kotlin with Java SAM expression.
import java.util.Arrays;
class NonCapturing {
public static void main(String... args) {
run(new Runnable() {
@Override public void run() {
System.out.println("Hey!");
}
});
}