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 is 1/8 divided by 2
Which answer choice does not contain any capitalization errors? A. "You are right," Rita agreed. "they need someone to give them instructions." B. "I'd l
explain how you can use a number line to show that 5/8 is greater than 3/8
Bees use nectar from the flowers of plants as food. As they collect nectar, dustlike pollen grains stick to their body. When they move from flower to flower, po
Emily is 4 years older than Grace. When their ages are added together they equal 26. How old is Emily?
what is 1/16 as a whole number
which is true about progressive leader Jane Addams?
which part of our earth is broken into plates ?
what is a wet mixture used in cooking. read paragraph 3
why did slavery spread in the south