Java – how to read a user’s char on the command line

How to read the user's char from the command line I am familiar with readint() There is no such thing as character

This is my Stanford Course in Stanford engineering. This course is part of Stanford engineering everywhere in the summer. I need to finish it soon before the beginning of high school semester

Is there any way to use ACM util,acm. program acm. Util or Java AWT class to complete this task, because this is the task I allow

Solution

final DataInputStream dis = new DataInputStream(system.in);
final DataInputStream dis = new DataInputStream(system.in);
final char c = dis.readChar();
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>