Java: How to get input from System.console()

后端 未结 9 1808
时光说笑
时光说笑 2020-11-22 09:08

I am trying to use Console class to get input from user but a null object is returned when I call System.console(). Do I have to change anything before using Sy

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 09:52

    Use System.in

    http://www.java-tips.org/java-se-tips/java.util/how-to-read-input-from-console.html

提交回复
热议问题