I have the following anonymous Runnable
implementation.
Runnable cronTask = new Runnable() {
@Override
public void run() {
// do something
}
};
IntelliJ suggests that I replace it with a lambda expression. eg:
Runnable cronTask = () -> {
// multiple "do something" statements
};
When using a single statement the syntax is:
Runnable cronTask = () -> doSomething();
What shortcut can I use to convert it?