← all problems

Fix lengthOrZero 🌶️

The method below is supposed to return the length of the String s, or 0 if s is null. It throws an exception for one kind of input. Find the bug and fix it. Run the tests and read each result: a wrong value and an exception are different clues.