Java中替换字符串中特定字符,replaceAll,replace,replaceFirst的区别
使用“;”替换过字符串中的“,”publicclassTest01{publicstaticvoidmain(String[]args){Stringnumber="123,456,5234,52345,63456,7456,7";StringnewNumber=number.replace(",",";");System.out.println(newNumber);}}结果:123;456;5