+ 1

How can Scanner read char?

I've Been trying but there's just Strings

7th Apr 2018, 8:00 PM
mateo quiceno toro
mateo quiceno toro - avatar
2 Answers
+ 3
You can't, but you could do this: for(char c : new Scanner(System.in).nextLine().toCharArray()) System.out.println(c);
7th Apr 2018, 8:20 PM
John Wells
John Wells - avatar