Java学习笔记20220715
作者:互联网
public static void main(String[] args) { String a="love234csdn"; String regEx="[^0-9]"; // 匹配所有的非数字 Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(a); String str = m.replaceAll(""); System.out.println(str); // 数字转char int c=98; char d= (char)c; System.out.println(d); for(int i=0;i<26;i++){ int j = i+97; char k = (char)j; System.out.println(String.valueOf(k)); } }
标签:Java,String,20220715,int,Pattern,System,笔记,char,out 来源: https://www.cnblogs.com/huanglei2010/p/16480074.html