方法1:使用String.replace()或String.replaceAll()适用于删除所有匹配的字符或符合特定模式的字符,示例1:删除所有特定字符Stringstr="Hello,World!"...