在idea中使用junit测试时,在方法内无法使用Scanner对象 解决方法:1.点击Help->Edit Custom VM OPtions打开文件 2.在文件内添加一条语句:-Deditable.java.test.console=true 3.重启idea