本文介绍了InputStreamReader或Java I / O控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 要在Java中获得用户输入,这是更好的方法?To get user input in Java which is the better method?reader = new BufferedReader(new InputStreamReader(System.in));这两者之间的区别是什么,要使用哪一个。what is the difference between the two and which one is to be used. Or is there any other better method other than these two?推荐答案控制台最近被引入Java(Java 6)并更容易地写入命令行。因此,我会使用控制台。Console was introduced recently to Java (Java 6) to make reading and writing to the command line easier. Therefore, I would use Console. 这篇关于InputStreamReader或Java I / O控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 19:48