题解 | #字符转ASCII码#
字符转ASCII码
https://www.nowcoder.com/practice/93f4d05a02d9468db424ed4316bfc8fd
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); //输入字符 char zf = in.next().charAt(0); //输出ASCII码 System.out.println(((int)zf)); } }