Answered step by step
Verified Expert Solution
Link Copied!

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?

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions