Oracle
1Z0-851 · Question #243
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 { } 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 { } class DoStuff implements DoStuff2 { public float getRange(int x, int y) { return 3.14f; } } interface DoAll extends DoMore { float getAvg(int a, int b, int c, int d); } 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
(15 responses)- A73% (11)
- B7% (1)
- E7% (1)
- F13% (2)
Community Discussion
No community discussion yet for this question.