← all problems

Fix comesFirst 🌶️🌶️

The method below is supposed to return true if the String a comes before the String b in dictionary order (capital letters come before lowercase, as compareTo orders them). It compiles, but it does not work: it is right for some pairs and wrong for others. Find the bug and fix it. Run the tests and read each result: a wrong value and an exception are different clues.