+ 1

char Input

How to read a char from input? Like we use nextInt() for integer input. How can we input a character?

28th Jan 2017, 3:20 PM
Nitesh Lekhi
Nitesh Lekhi - avatar
5 Answers
+ 2
try "nextLine()" or "next()"
28th Jan 2017, 4:16 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
0
But nextLine()is for String. It can also get more than 1 character during input.
28th Jan 2017, 5:47 PM
Nitesh Lekhi
Nitesh Lekhi - avatar
0
Thanks for the Help👍👍
28th Jan 2017, 6:15 PM
Nitesh Lekhi
Nitesh Lekhi - avatar