Provide a robust method named getOddDigit which prompts the user to enter an odd digit and returns
Question:
Provide a robust method named getOddDigit which prompts the user to enter an odd digit and returns the odd digit as an int. Read the input as a string and verify that the input consists of a single odd digit. If the user enters invalid input, repeat the prompt and input.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean
Question Posted: