scan没有char的识别,可以使用string,通过word.charAt(0);获取
String character scan = scan.next();
char c = character.charAt(0);
scan没有char的识别,可以使用string,通过word.charAt(0);获取
String character scan = scan.next();
char c = character.charAt(0);
本文标题:输入 scan, charAt()
本文链接:https://www.haomeiwen.com/subject/rargiktx.html
网友评论