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 ? | 34 Yes | 1 No |
Post New Answer View All Answers
What is final int?
What is boolean example?
Write a function for palindrome and factorial and explain?
Which are different kinds of source code?
what is the difference between preemptive scheduling and time slicing? : Java thread
Why do we need variables?
What is parsing a sentence?
Where will it be used?
What is merge sort in java?
What is comparator in java?
What is type conversion in java?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What is the purpose of the strictfp keyword?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is the default execution method in java?