java字符与ASCII码互转
java字符与ASCII码互转字符转对应ASCII码记住我// ⽅法⼀:将char强制转换为bytechar ch = 'A';byte byteAscii = (byte) ch;System.out.println(byteAscii);// ⽅法⼆:将char直接转化为int,其值就是字符的asciiint byteAscii1 = (int) ch;System.out.println(b...
2023-12-02 17 0
java字符与ASCII码互转字符转对应ASCII码记住我// ⽅法⼀:将char强制转换为bytechar ch = 'A';byte byteAscii = (byte) ch;System.out.println(byteAscii);// ⽅法⼆:将char直接转化为int,其值就是字符的asciiint byteAscii1 = (int) ch;System.out.println(b...