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
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?
What do you mean by garbage collection used in java?
What is the difference between the paint() and repaint() methods?
What is the difference between arraylist and hashset in java?
Is it possible to override private or static method in java?
What is a data structure java?
Are static members inherited to sub classes?
How does indexof work?
How are variables stored?
Java is Pass by Value or Pass by Reference?
What is string buffer?
Can set contain duplicates?
How does sublist works in java?
What is the main use of generics in java?
What is sortedmap interface?