Loading lesson…
Level 1 · Apprentice0 XP
Stop null from spreading, and keep libraries you do not own at the edge.
Step 1 / 6
ProblemfindUser() returns null when nothing is found. Ten callers. Nine check. The tenth crashes on Friday night.
← → step
Before this: Formatting and layout
🛠️ 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.Find three functions that can return null. Change each to return an empty list, a nullable type the compiler checks, or a null object. Then wrap one third-party library call behind your own interface.