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 with AI-Powered 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

Students also viewed these Databases questions