Oracle
1Z0-809 · Question #50
1Z0-809 Question #50: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #50. The question stem and answer options stay visible for context.
Question
Given that course.txt is accessible and contains:
Course : Java
and given the code fragment:
public static void main (String[ ] args) {
char i;
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?
Options
- Aur::va
- BueJa
- CThe program prints nothing.
- DA compilation error occurs at line n1.
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.