nerdexam
Oracle

1Z0-851 · Question #208

Given: interface DoStuff2 { float getRange(int low, int high); } interface DoMore { float getAvg(int a, int b, int c); } abstract class DoAbstract implements DoStuff2, DoMore { } 06. class DoStuff…

The correct answer is A. The file will compile without error. See the full explanation below for the reasoning.

Question

Given: interface DoStuff2 { float getRange(int low, int high); } interface DoMore { float getAvg(int a, int b, int c); } abstract class DoAbstract implements DoStuff2, DoMore { } 06. class DoStuff implements DoStuff2 { 07. public float getRange(int x, int y) { 08. return 3.14f; 09. } 10. } 11. 12. interface DoAll extends DoMore { 13. float getAvg(int a, int b, int c, int d); 14. } What is the result?

Options

  • AThe file will compile without error.
  • BCompilation fails. Only line 7 contains an error.
  • CCompilation fails. Only line 12 contains an error.
  • DCompilation fails. Only line 13 contains an error.
  • ECompilation fails. Only lines 7 and 12 contain errors.
  • FCompilation fails. Only lines 7 and 13 contain errors.
  • GCompilation fails. Lines 7, 12, and 13 contain errors.

How the community answered

(55 responses)
  • A
    75% (41)
  • D
    4% (2)
  • E
    5% (3)
  • F
    2% (1)
  • G
    15% (8)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice