Skip to main content

One post tagged with "lambda"

View All Tags

· 7 min read

A lambda expression can be defined as a concise representation of an anonymous function that can be passed around: it doesn’t have a name, but it has a list of parameters, a body, a return type, and also possibly a list of exceptions that can be thrown.

Lambda expressions are anonymous functions which are like methods but without a class. But like a method, a lambda has a list of parameters, a body, a return type, and a possible list of exceptions that can be thrown. Thus a lambda expression can be passed as argument to a method or stored in a variable.