Reputation: 45
How to read single character from console in java...?? can it done without BufferedReader..?
Upvotes: 1
Views: 2557
Reputation: 245429
Using:
int byte = system.in.read();
char singleChar = (char)byte;
should read a single byte from the console.
Upvotes: 4