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

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!