Ask Question

Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the same as the original string except with each blank replaced by an asterisk "*".

+5
Answers (1)
  1. 16 January, 12:29
    0
    You should state what language you want your answer to be in before you ask programming questions. Here is what you're looking for in Java:

    public static String replace (String str) {

    return str. replace (' ', '*');

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the same as the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers