10. class Nav{
11. public enum Direction { NORTH, SOUTH, EAST, WEST }
12. }
13. public class Sprite{
14. // insert code here
15. }
Which code, inserted at line 14, allows the Sprite class to
compile?
a)Direction d = NORTH;
b)Nav.Direction d = NORTH;
c)Direction d = Direction.NORTH;
d)Nav.Direction d = Nav.Direction.NORTH;
Answer Posted / neil
Nav.Direction d = Nav.Direction.NORTH;
Is This Answer Correct ? | 33 Yes | 1 No |
Post New Answer View All Answers
What is nested interface?
Can you inherit a constructor java?
What is map and hashmap in java?
What is a subsequence of a string?
What are the methods available in a class?
What is gc()?
Explain the difference between throw and throws in java?
What's the base class of all exception classes?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
What about static nested classes in java?
What are wrapper classes in java?
What are the different http methods?
What are the types of methodology?
Tell me how many ways are there to initialise an integer with a constant.
Can we create a constructor in abstract class?