Java SE 8 Programmer II (1Z0-809)
© examsiri.com
Question : 4 of 8
Marks:
+1,
-0
Assuming that the TestResult.txt file exists and given the code fragment:
Which code fragment at Line n1 compiles?
public class TestReadFile {
public void readFile(String fName) throws IOException {
/* Line n1*/
Stream content = Files.lines(p);
content.forEach(s1 -> System.out.println(s1));
}
public static void main(String[] args) throws IOException {
TestReadFile trf = new TestReadFile();
trf.readFile("TestResult.txt ");
} } Which code fragment at Line n1 compiles?
Go to Question: