Question fetched from API endpoint api/expression/5/2
{
"result": [
{
"message": "com.example.mistakes.expression._05_UnaryPlusOperator.Ex2",
"before": " int before(int x, int y) {\n // @formatter:off\n return x =+ y;\n // @formatter:on\n }\n",
"after": " int after(int x, int y) {\n return x += y;\n }\n",
"chapter": 2,
"id": "2_05_2",
"className": "Ex2",
"path": "file:///home/runner/work/100_java_mistakes/100_java_mistakes/back/src/main/java/com/example/mistakes/expression/_05_UnaryPlusOperator.java"
}
],
"length": 1
}
int before(int x, int y) {
// @formatter:off
return x =+ y;
// @formatter:on
}
int after(int x, int y) {
return x += y;
}