Kaitlon7302 Kaitlon7302
  • 03-07-2019
  • Computers and Technology
contestada

Regarding enumerations, the ____ method returns an array of the enumerated constants.

a.
values

b.
valueOf

c.
toArray

d.
ordinal

Respuesta :

Branta Branta
  • 15-07-2019

Answer:

a. values

Explanation:

The values() method returns an array of all values of an enumeration. This method is defined automatically by the java compiler for the enum data type.

For example:

enum Traffic_Signal {RED,YELLOW,GREEN};

for(Traffic_Signal t : Traffic_Signal.values()){

   System.out.println(t);

}

This code segment will print out all the valid values in the Traffic_Signal enumeration.

Answer Link

Otras preguntas

Slope = -5 and Y -intercept (0,7)
Why are tropical climates so hot?
What is the mean absolute deviation (MAD) of the data set? {2, 5, 6, 12, 15} Enter your answer in the box.
What is the answer please
What is the approximate area of the circle? Use π ≈ 3.14. 32.7 square centimeters 65.2 square centimeters 108.2 square centimeters 339.6 square centimeters
When light passes from one medium to another, resulting in a change in speed and direction of insolation,?
PLZZZZ HELP !!!!!!!!
suggest two ways that chemical pollutants could be carried far from their sources
Which accurately describes a function of costume design? a. may establish social and economic status of the characters b. may embody a metaphor, symbol or all
List four sources for finding information about occupations, employers, or specific jobs.