可对照查看网盘ASCII表
public static void main(String[] args) { // // TODO Auto-generated method stub int a=001; int b=32;//制表符 int c=13;//回车键 char character = (char)a; char cb = (char)b; String line ="niaho" + character + "woma"; String ar= String.valueOf(character); //int转化成字符串,为1 String line2=line.replace(character, cb);//// replace(oldchar,newchar) System.out.println("line:"+line+" "); System.out.println("line:"+line2+" "); }
时间: 2024-11-05 06:13:34