62,621
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) throws FileNotFoundException {
File file = new File("d:\\1.txt");
Scanner in = new Scanner(file);
while (in.hasNextLine()) {
System.out.println(in.nextLine());
}
}
// 打印结果
// 哈哈哈啊哈
// adsfsad
// 阿道夫