Java Quiz
10 questions · no time limit
0:00
PROBLEM-SOLVING PATTERNS
Question 1 of 10
No time limit
Current
Answered
Flagged
Not seen
PASSAGE
A console program reads an age. Each input line is valid only if, after removing surrounding whitespace, it contains exactly one decimal integer. If a line contains any other text, the entire line must be rejected. Assume each choice handles NumberFormatException or an unsuccessful scanner test by reporting invalid input and prompting again.
Which approach most accurately enforces the specified line-oriented input format?
YOUR PROGRESS
10
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F