Practice · 3 of 3
Optional at the boundary
CHALLENGE
Difficulty: advanced+25 XP
Write parsePort(String input): return Optional of the parsed port when input is a valid number in 1..65535; Optional.empty() otherwise (null, blank, non-numeric, or out of range).
Press Submit to check your solution.
Back to lesson: Practice: Practice: Pipelines at Work