Quick Answer
Lambda expressions are short anonymous functions. Syntax: (params) -> expression or (params) -> { statements }. Enables functional programming style. Used to implement functional interfaces (interfaces with one abstract method). Instead of anonymous inner class: Comparator c = (a, b) -> a.compareTo(b). Lambdas capture effectively final variables from the enclosing scope.
Answer
Lambda expressions are anonymous functions used to implement functional interfaces. They simplify collection processing, event handling, and reduce boilerplate. Improve readability compared to anonymous inner classes.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.