Scanner

接受用户输入的数据

Scanner scanner=new Scanner(System.in);

scanner.nextLine();回车为结束符之前的字符

scanner.next();空白结束符之前的字符

使用IO流最好关掉

关闭:scanner.close(

posted @ 2021-06-13 16:47  库里在线  阅读(31)  评论(0)    收藏  举报