JAVA,字符串替换

package l515;
//例5.15
//字符串替换
public class NewStr {

	public static void main(String[] args) {
		String str ="address";
		
		//将字符串str中的字符"a"替换成"A"后返回新字符串newstr
		String newstr =str.replace("a","A");

		System.out.println(newstr);
	}

}
原文地址:https://www.cnblogs.com/max-hou/p/10159011.html