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 the difference between choice and list?
How will you communicate between two applets?
Can bool be null?
How static variable work in java?
What are the main differences between notify and notifyAll in Java?
What is the final variable?
why not override thread to make a runnable? : Java thread
Explain the importance of finally over return statement?
For class CFoo { }; what default methods will the compiler generate for you>?
how is final different from finally and finalize in java?
Are arrays static in java?
What are packages in java?
Can we call virtual funciton in a constructor ?
Explain the differences between abstraction and encapsulation?
Does set allows null in java?