'How do you convert this method into a lambda expression?

public int square(int x) {
    return x * x;
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source