Question: reverseDigits should take a String as input and output a String. The output String should be identical to the input String except all digits (0

reverseDigits should take a String as input and output a String. The output String should be identical to the input String except all digits (0 through 9) of the input Stringare in reverse order (but same locations) in the output String. reverseDigits("0 the d1gits of the2 string3 4 are8 reversed 9!") should return "9 the d8gits of the4 string3 2 are1 reversed 0!"

You are allowed to use the following from the Java API:

class String

length

charAt

class StringBuilder

length

charAt

append

toString

class Character

any method

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!