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

Is baking soda a element, compound or a mixture?
Explain why changes of state are physical changes.
consecuencias que se vivieron en america despues del transulturalidadayudaaaa!
Extinction of an animal or bird leads to ecological Instability. Do you Agree with this statement? Justify.
P, Q, V, and K are collinear with V between K and P, and Q between V and K. If VP = 14x + 4, PK = x + 630, VQ = 17x + 6, and KQ = 11x + 5, solve for VP.
Please help with 27 28 29 and 30 this is due in the morning
5 times a number k minus 9 is two thirds of a number j. solve for j
Rounding 55,183 to the nearest thousand gives
By the mid 1700s , slaves in Virginia were?
Travelling to space is an extraordinary experience. why?​