Create a gist now

Instantly share code, notes, and snippets.

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