public class LambdaBytecode {
interface Lambda {
public void closure();
}
public LambdaBytecode() {
}
public static void main(String[] args) {
Lambda l = new Lambda() {
@Override
public void closure() {
String s = "Hello";
//more stuff
System.out.print(s);
}
};
String s = "World";
l.closure();
System.out.print(s);
}
}
Java Code:
Disassembly:
as we can see the anonymous object of the Lambda Interface is named With the Interface-name, a dollar sign and a count ...