直接看例子,while(scanner.hasNext()){..}