想把["-1","-2","01"]字符串使用String的replace()替换,替换后为["01"],但是我使用如下代码处理始终不起作用。求大神帮忙我的代码如下:
String s = "[\"-1\",\"-2\",\"01\"]"; String t = "\"-1\",\"-2\","; s.replace(t, ""); System.out.println(s);
白板的微信
相关分类