Scanner使用方法

使用Scanner三步骤
Scanner使用方法Scanner常用方法:
(1)String next():获得一个字符串
(2)int nextInt():获得一个整数数值
(3)double nextDouble():获得一个双精度类型数值
(4)boolean hasNext():判断是否有输入数据,有则返回true;否则,返回false。