Where's the code for a lambda located in a java class file?
问题 I've this java source file: import java.util.function.*; public class t { public static void main(String[] args) { Function<Integer,Integer> r = (a) -> a*a+2*a+1; System.out.println(r.apply(2)); } } I compile it and it works as expected. Here's the output of javap -c -v t , and I can't find the location of lambda in it. Where's the bytecode which tells the jvm to compute the expression with the input Integer whenever the lambda is envoked? 回答1: If you want to see the code of your lambda body