الرجوع
تسجيل الدخول

What is the primary purpose of this code?

File file = new File("input.txt");
Scanner scanner = new Scanner(file);
while(scanner.hasNextLine()) {
    String line = scanner.nextLine();
    System.out.println(line);
}
scanner.close();