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


Please Help Members By Posting Answers For Below Questions

Write a java program that prints all the values given at command-line.

537


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

2117


What are different access specifiers in java? Explain

614


What is the largest data type in java?

500


Why is string buffer better than string ?

582






What do you mean by hashing?

635


Difference between this() and super() ?

563


What are the core java topics?

552


What Is Query Throttling in java?

549


How to perform merge sort in java?

572


What do you understand by the term singleton?

567


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

742


Which is the class in java?

509


What is lifetime variable?

516


What does singleton mean in java?

499