Lambdas in Java are compiled into anonymous inner classes. The Java compiler generates an anonymous inner class for each lambda expression that you define in your code. This anonymous inner class implements a functional interface (an interface with a single abstract method), and provides the implementation of the abstract method for the lambda expression. The generated anonymous inner class is then compiled as a normal Java class.

Here’s an example of how a lambda expression might be compiled into an anonymous inner class:

// original lambda expression
Runnable r = () -> System.out.println("Hello World");

// equivalent anonymous inner class
Runnable r = new Runnable() {
  @Override
  public void run() {
    System.out.println("Hello World");
  }
};

In this example, the lambda expression () -> System.out.println("Hello World") is equivalent to the anonymous inner class new Runnable() {...}. The lambda expression is a shorthand syntax for creating an instance of an anonymous inner class that implements the Runnable interface. The generated anonymous inner class has a single method, run, that provides the implementation for the lambda expression.