๐ WAYPOINT LESSON
Checkpoint: Name Analyzer
โญ beginnerโณ 45 min read๐ Lesson 29 of 180
Initials, vowels, email masking, and username validation โ the full string toolbox under boundary pressure.
The Name Analyzer crunches names with the full string toolbox.
Implement:
static String initials(String first, String last)โ both initials upper-cased with a dot between:initials("ada","lovelace")is"A.L.". Null or blank parts are skipped entirely (initials(null,"hopper")is"H."; both blank โ"").static int vowelCount(String text)โ counta e i o uin any case.static String maskEmail(String email)โ replace everything before and including the@with"***@"; input without@comes back unchanged.maskEmail("ada@example.com")is"***@example.com".static boolean isUsername(String s)โ a valid username is 3โ16 characters, letters/digits/underscore only, and does NOT start with a digit. Null is invalid.