Java, Java8, Java21, Java17, Migration.
functional programming, such as Java. // Traditional approach using an anonymous inner class Runnable runnable = new Runnable() { @Override public void run() { System.out.println("Hello, world!"); } }; // Using lambda expression Runnable lambdaRunnable = () -> { System.out.println("Hello, world!");