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

Why is sodium sulphate hemihydrate called as "Plaster of Paris"?
How do you?...Multiply out and simplify 10(2x-1)-20x?
in the number 13,407.036 there are two 3's. Explain how the values of the 3's are related.
Mini-Project: Cents and the Central Limit Theorem 1. Collect a sample of at least 50 pennies by setting aside all the pennies you receive in change for severa
What is the amplitude of y=1/2 sin2x
in the number 13,407.036 there are two 3's. Explain how the values of the 3's are related.
in the number 13,407.036 there are two 3's. Explain how the values of the 3's are related.
in the number 13,407.036 there are two 3's. Explain how the values of the 3's are related.
What is the amplitude of y=1/2 sin2x
Mini-Project: Cents and the Central Limit Theorem 1. Collect a sample of at least 50 pennies by setting aside all the pennies you receive in change for severa