Look at the code below:
String pathToFile = "file.txt";
try (Scanner scanner = new Scanner(new File(pathToFile))) {
scanner.nextLine();
scanner.nextLine();
System.out.println(scanner.nextLine());
}
Our file file.txt contains just 2 lines:
first
second
What does the code print in a console in this case?
Hint: to find the right answer you may run this piece of code on your computer and check the result.