Oracle Java SE 8 Programmer II 1z0-809 Question # 59 Topic 6 Discussion

Oracle Java SE 8 Programmer II 1z0-809 Question # 59 Topic 6 Discussion

1z0-809 Exam Topic 6 Question 59 Discussion:
Question #: 59
Topic #: 6

Given that course.txt is accessible and contains:

Course : : Java

and given the code fragment:

public static void main (String[ ] args) {

int i;

char c;

try (FileInputStream fis = new FileInputStream (“course.txt”);

InputStreamReader isr = new InputStreamReader(fis);) {

while (!isr.close()) { //line n1

isr.skip(2);

i = isr.read ();

c = (char) i;

System.out.print(c);

}

} catch (Exception e) {

e.printStackTrace();

}

}

What is the result?


A.

ur :: va


B.

ueJa


C.

The program prints nothing.


D.

A compilation error occurs at line n1.


Get Premium 1z0-809 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.