Oracle
1Z0-851 · Question #252
Given: class Nav{ public enum Direction { NORTH, SOUTH, EAST, WEST } } public class Sprite{ // insert code here } Which code, inserted at line 14, allows the Sprite class to compile?
The correct answer is D. Nav.Direction d = Nav.Direction.NORTH. See the full explanation below for the reasoning.
Question
Given: class Nav{ public enum Direction { NORTH, SOUTH, EAST, WEST } } public class Sprite{ // insert code here } Which code, inserted at line 14, allows the Sprite class to compile?
Options
- ADirection d = NORTH;
- BNav.Direction d = NORTH;
- CDirection d = Direction.NORTH;
- DNav.Direction d = Nav.Direction.NORTH;
How the community answered
(42 responses)- A5% (2)
- B12% (5)
- C2% (1)
- D81% (34)
Community Discussion
No community discussion yet for this question.