Statement lambda can be replaced with expression lambda’s warning
The full text of warning is as follows
Statement lambda can be replaced with expression lambda less… (Ctrl+F1)
This inspection reports lambda expressions with code block bodies when expression-style bodies can be us
The place of warning is here
recyclerViewAdapter.setOnItemClicListener ((v ,id) -> {
checkChoosed(id);
});
Just change it to this
recyclerViewAdapter.setOnItemClicListener ((v ,id) -> checkChoosed(id) );
OK. Now that the lamda expression is used, it can be simpler
Read More:
- JAVA lambda Syntax error on tokens, Expression expected instead
- error: a label can only be part of a statement and a declaration is not a statement (How to Fix)
- The use of C + + template function and lambda expression
- Error: (44,73) lambda expression and XML are not supported in Java: – source 1.7 Error:java : Compilation failed
- Lambda set to map duplicate key error solution
- How to Fix Invalid bound statement (not found) Error
- error C2057: expected constant expression (Can the size of an array in C language be defined when the program is running?)
- UnhandledPromiseRejectionWarning Error: Can‘t set headers after they are sent (How to Fix)
- [solution] warning: this statement may fall through [- wimplicit fallthrough]) encountered during GCC compilation
- The registered version of ArcEngine can edit the data in SDE (How to Fix 0x80040356 Error)
- How to Fix char cannot be dereferenced Error
- How to fix “Outlook data file cannot be accessed” error (Solved)
- Git bash display error can not be used, how to solve
- Android:Field can be converted to a local varible.
- How to Fix Error: JavaFX cannot find fxml
- How to Fix “junit.framework.Comparison Failure Expected: but was”
- Solve the problem that vscode cannot convert the easy less plug-in to the less expression value
- Android resource compilation failed (How to Fix)
- How to Fix Session is not Connecting (How to Diagnose it)
- How to Fix Error in module RSQL of the database interface