📜  如何在java代码示例中扫描为字母

📅  最后修改于: 2022-03-11 14:52:24.046000             🧑  作者: Mango

代码示例1
Scanner scanner = new Scanner(System.in);
String str = scanner.next();
char ch = str.charAt(0);