Skip to main content

Practice · 3 of 3

Debug: the title-izer that misbehaves

CHALLENGE
Difficulty: beginner+25 XP

titleCase should capitalize the first letter of EVERY word and lower the rest: titleCase("the JAVA tutorial") is "The Java Tutorial". The version below drops words and keeps wrong case — find both bugs (loop boundary and char handling) and fix them.

Back to lesson: Practice: Practice: Text Processing