📅  最后修改于: 2022-03-11 14:59:39.248000             🧑  作者: Mango
代码示例1
Scanner obj=new Scanner(System.in);
for(int i = 0; obj.hasNextLine();){
System.out.println(++i + " " + obj.nextLine());
}