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
Write a java program that prints all the values given at command-line.
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
What are different access specifiers in java? Explain
What is the largest data type in java?
Why is string buffer better than string ?
What do you mean by hashing?
Difference between this() and super() ?
What are the core java topics?
What Is Query Throttling in java?
How to perform merge sort in java?
What do you understand by the term singleton?
When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?
Which is the class in java?
What is lifetime variable?
What does singleton mean in java?