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

What is ‘has a’’ relationship in java?

724


Is there any difference between synchronized methods and synchronized statements?

586


Explain how hashmap works?

592


Is java 11 paid version?

512


Is Java a dying language?

573






Explain the use of javap tool.

632


Is minecraft java edition free?

578


How to compare strings in java?

506


What is difference in between java class and bean?

568


Explain the inheritance?

577


What is the return type of the main method?

575


I want to persist data of objects for later use. What’s the best approach to do so?

502


What all access modifiers are allowed for top class ?

713


What is class variable java?

583


What is JFC?

708