Question: write the method called replaceString which takes a String argument. The method will pick a random integer representing one of the characters in the String
write the method called replaceString which takes a String argument. The method will pick a random integer representing one of the characters in the String and returns a String that has that position in the String replaced with a "9".
ex
replaceString("Dude") returns "9ude" or "D9de" or "Du9e" or "Dud9"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
