Question fetched from API endpoint api/expression/11/4
{
"result": [
{
"message": "com.example.mistakes.expression._11_IgnoredReturnValue.Ex4",
"before": " BitSet before(BitSet s1, BitSet s2) {\n s1.intersects(s2);\n return s1;\n }\n",
"after": " BitSet after(BitSet s1, BitSet s2) {\n s1.and(s2);\n return s1;\n }\n",
"chapter": 2,
"id": "2_11_4",
"className": "Ex4",
"path": "file:///home/runner/work/100_java_mistakes/100_java_mistakes/back/src/main/java/com/example/mistakes/expression/_11_IgnoredReturnValue.java"
}
],
"length": 1
}
BitSet before(BitSet s1, BitSet s2) {
s1.intersects(s2);
return s1;
}
BitSet after(BitSet s1, BitSet s2) {
s1.and(s2);
return s1;
}