Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

JAVA Programming Write a program to read in a LINE from the user and replace all digits in the String with an underscore (_). Create

JAVA Programming

Write a program to read in a LINE from the user and replace all digits in the String with an underscore (_). Create a Scanner that reads from System.in. Do the following WHILE the user doesnt enter an empty String. Ask the user to enter a string. Read the String with nextLine(). Create an empty output String. For each character, check if it is a digit (you can use Character.isDigit()). If it is, append an underscore to the output String. Otherwise, append the original character to the output String. Print the output String.

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_2

Step: 3

blur-text-image_3

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students explore these related Databases questions