Answer:
Check the explanation
Step-by-step explanation:
public String replace(String sentence){
if(sentence.isEmpty()) return sentence;
if(sentence.charAt(0) == ' ')
return '*' + replace(sentence.substring(1,sentence.length()));
else
return sentence.charAt(0) + replace(sentence.substring(1,sentence.length()));