Lambda expression can stand alone and must be assigned to a variable whose type is a functional interface code example
Example: lambda java advanced condition
public void method() { String localVariable = "Local"; Foo foo = parameter -> { String localVariable = parameter; return localVariable; };}