JAVA中怎么将这段字符串中 “200米混合泳% 10米跳台跳水 ”的 “%” 换成 “%25” ? 急求啊!!

如题所述

第1个回答  2013-06-18
String s = "200米混合泳% 10米跳台跳水";
s = s.replace("%", "%25");
System.out.println(s);

第2个回答  2013-06-18
String str="
200米混合泳% 10米跳台跳水
"

str.replaceAll("%","%25")本回答被提问者采纳
相似回答