1. What is a Lambda Expression?

English Definition A Lambda Expression is a short way to write an anonymous function (a function without a name). It is used to implement functional interfaces in Java (interfaces with a single abstract method).
Hinglish Explanation Lambda Expression Java mein ek chhota aur aasaan tarika hai jisse hum bina naam wala function likh sakte hain. Iska upyog Functional Interface ko implement karne ke liye kiya jata hai.
Lambda Syntax
// General Syntax
(parameters) -> {
    // method body
}

// Short Addition Example
(a, b) -> a + b
Key Symbol (->) is known as the Lambda operator (arrow operator). It separates the parameter list from the body.

2. Example Without Lambda Expression

Before Java 8, implementing an interface inline required a verbose anonymous inner class:

Main.java — Without Lambda (Anonymous Class)
interface MyInterface {
    void show();
}

public class Main {
    public static void main(String args[]) {
        MyInterface obj = new MyInterface() {
            public void show() {
                System.out.println("Hello Java");
            }
        };
        obj.show();
    }
}
Console OutputHello Java

3. Example With Lambda Expression

With a Lambda Expression, the boilerplate vanishes while producing the exact same result:

Main.java — With Lambda Expression
interface MyInterface {
    void show();
}

public class Main {
    public static void main(String[] args) {
        MyInterface obj = () -> {
            System.out.println("Hello Java");
        };
        obj.show();
    }
}
Console OutputHello Java

Interactive Lambda Tester: (a, b) -> a + b

+
Result: (10, 25) -> 35