nerdexam
Exams1Z0-803Questions#50
Oracle

1Z0-803 · Question #50

1Z0-803 Question #50: Real Exam Question with Answer & Explanation

The correct answer is A: Option A. A: Throwing the same exception is fine. C: Using a subclass of java.io.IOException (here java.io.FileNotFoundException) is fine E: Not using a throw clause is fine. Incorrect answers: B: Exception is not a subclass of java.io.IOException and cannot be used here. D: Not extends. S

Question

Given the code fragment: interface SampleClosable { public void close () throws java.io.IOException; } Which three implementations are valid?

Exhibit

1Z0-803 question #50 exhibit

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E

Explanation

A: Throwing the same exception is fine. C: Using a subclass of java.io.IOException (here java.io.FileNotFoundException) is fine E: Not using a throw clause is fine. Incorrect answers: B: Exception is not a subclass of java.io.IOException and cannot be used here. D: Not extends. SampleCloseable cannot be the superclass of Test, a superclass must be a (An interface extends other interfaces.)

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice