Skip to main content

Practice · 1 of 3

The uncrashable age parser

CHALLENGE
Difficulty: intermediate+25 XP

Write parseAge(String field) that returns the age as an Integer, or null when it is missing, not a number, or implausible (outside 0..150). Trim whitespace before parsing.

Back to lesson: Practice: Practice: Fail Well