开发者

Reading single character from console in java

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜