我正在尝试插入来自scanner类的字符值。我尝试了下面的方法。
Scanner sc = new Scanner(System.in); character = sc.nextChar();
它不起作用,因为我的下一个方法只接受char值。我使用sc.charAt(0)进行了尝试。啊,真灵。有没有其他方法可以尝试。
https://stackoverflow.com/questions/51229669
相似问题