Note that you don't really need to do this in a condition - after all, if the sentence doesn't contain "and", it does no harm to perform the replacement:String sentence = "Define, Measure, Analyze, Design and Verify";sentence = sentence.replace("and", " "); 这篇关于字符串替换方法不替换字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-11 16:45