Level 1 · Apprentice0 XP
What a variable really holds, and why == surprises people.
Step 1 / 5
ProblemYou pass a list to a method that 'only reads' it. After the call your list has an extra element. In another place two strings with the same text compare as different with ==. Both come from one misunderstanding.
← → step
Before this: Code reviews and team habits
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Predict, then run: pass a list and an int to a method that changes both, and print them after the call. Then compare two new String("a") with == and equals, and two Integer values of 100 and of 1000 with ==. Explain each result in one sentence.