首页 > 学院 > 开发设计 > 正文

JAVA除去制定字符的方法

2019-11-14 15:20:11
字体:
来源:转载
供稿:网友

只需调用replaceAll()方法:

public class Test 

public static void main(String[] args) 

String s= "abcdabcdabcd "; 
System.out.PRintln(s); 
System.out.println(s.replaceAll( "a", "")); 

}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表