Skip to content

Instantly share code, notes, and snippets.

@kevinpet
Last active December 16, 2015 17:19
Show Gist options
  • Save kevinpet/5469657 to your computer and use it in GitHub Desktop.
Save kevinpet/5469657 to your computer and use it in GitHub Desktop.
class WithLambda {
public static void main(String[] args) {
Runnable r = () -> System.out.println("and it works...");
r.run();
}
}
class WithoutLambda {
public static void main(String[] args) {
Runnable r = new Runnable() {
public void run() {
System.out.println("and it works...");
}
};
r.run();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment