开发者

Reading single character from console in java

开发者 https://www.devze.com 2023-02-07 04:24 出处:网络
How to read single character from console in java...?? can it done w开发者_运维知识库ithout BufferedReader..?Using:

How to read single character from console in java...?? can it done w开发者_运维知识库ithout BufferedReader..?


Using:

int byte = system.in.read();
char singleChar = (char)byte;

should read a single byte from the console.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号