Lambda Expressions is an anonymous class to treat functionality as method argument, or code as data.
Java:
Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(new Runnable() {
@Override
public void run() {
action();
}
}, timeout);
Lambda Expression:
Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(() -> {
action();
}, timeout);