ASCII码与char的互转
程序员文章站
2022-07-02 20:24:05
...
只要强制类型转换就行
int ascii_a = 97;
char a = (char) ascii_a ;
System.out.println(a);
结果为 a
char a = 'a';
int ascii = (int)a;
System.out.println(ascii);
结果为 97