Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In my java program, I would like to insert another error message, if the input is a string. Can this be done? import java.util.; public
In my java program, I would like to insert another error message, if the input is a string. Can this be done?
import java.util.; public class RomanNumerals public static void main(String args) t Scanner scanner-new Scanner(System. in); //Enable a new entry, if the input is invalid System.out.println"Enter a positive integer : do int str scanner.nextIntO; System.out.println(stris not a positive integer. Please enter a positive integer." else t String roman = Roman(str); System.out.println(str + " = " + roman); //break from the Loop, when the input is valid break; while true); private static String RomanCint number)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started