Question: 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?

In my java program, I would like to insert another error message,

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!