Question: Assume you have an enum called Navigation. It is declared like this: public enum Navigation { LEFT, RIGHT, STRAIGHT } Which of the following is
Assume you have an enum called Navigation. It is declared like this: public enum Navigation { LEFT, RIGHT, STRAIGHT } Which of the following is a valid Java statement?
A. Navigation navRight = myNavigation.RIGHT; // assume myNavigation is an instance of Navigation B. Navigation navRight = new Navigation(); C. Navigation navRight = Navigation.RIGHT; D. Navigation navRight = Navigation.get(RIGHT);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
