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

25% of what number is 21
Eun Mi raked 1/3 of her mothers lawn. Her brother also raked 1/3 of the lawn. What part of the whole lawn still needs raking?
Grace is standing 14 feet from a lighthouse and Kelly is standing 12 feet from Grace. The angle that Grace looks up to see the top of the lighthouse is 45°. The
What is 30x pulse 80x
How can the number family 3,4,7 help you to solve the equation 3 + x = 7 ? ALL HELP APPRECIATED!
Who did the central powers fight in world war 1?
A recipe calls for 5/4 cup of flour. John wants to triple the recipe. How much flour should John use?
Why were the Radicals intent on changing Lincoln’s plan of Reconstruction? Lincoln was dead and a new plan had to be devised. Lincoln had not dealt sternly enou
State supreme courts primarily have what type of jurisdiction?
Water is most likely represented by the