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

Typically, a bullet leaves a standard .50-caliber rifle (29.0-in. barrel) at a speed of 853 m/s. If it takes 1.2 milliseconds to traverse the barrel, determine
Yo ____________________ tres hermanas y un hermano. tengo tienes tiene tenemos
Convergence of the series sin(na)/ln(10)^n
what is the most common way citizens were able to change their absolute monarchies into constitutional monarchies?
Can someone name one location where you might see fractals in everyday life?
which region is located south of the Caucasus mountains
Which is a raw material of photosynthesis? a. light b. h2o c. glucose d. o2
If the legs of an isosceles right triangle have a length of 15√2 ft, the hypotenuse will have a length of __ feet.
In March, volunteers for a charity walkathon in Toronto raised $89,351. Volunteers in Montreal raised $102,459. Volunteers in Edmonton raised $78,505. a. Round
The ratio of two numbers is 2:3, and their sum is 60. find the two numbers