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

What accounts for why the Soviet Union decided to formalize its East European alliance through the Warsaw Pact? to convince the world that communism was the bes
Why did congress reconstruction efforts to ensure equal rights to the freedmen fail?
How does NADP+ Become NADPH?
how many times does 96 go into 195
is 2/9 closest to 0 1/2 or 1
1. In "In the Shadow of War", Omovo follows the soldiers and the women most likely because he (1 point) A. Yields to the curious whims of boys his age B. hopes
From a population of red brown orange yellow and green butterflies only the red and green ones survive since they can blend into their environment and reduce pr
What is d slope intercept of 11x-8y=-48
Which of the following is an issue that would need to be determined by Constitutional law? 20points -A city wants to review articles about its commission meeti
Why earth isn't getting bigger even though the continents are spreading apart