Skip to content

Instantly share code, notes, and snippets.

View ddnosh's full-sized avatar

VBear ddnosh

View GitHub Profile
@ddnosh
ddnosh / Java6.java
Created June 29, 2021 11:43 — forked from JakeWharton/Java6.java
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!");
}
});
}