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 the base 5 representation of the number 465^8 A) 1231(5) B) 1141(5) C) 2214(5) D) 2351(5)
Which structure in a cell corresponds with the function of the human lungs? A. Nucleus B. Vacuole C. Cell membrane D. Mitochondria Please explain why, cause I
According to dolores dooley, the republic of ireland has been engaged in
What is the slope of a line that passes through (-8,-16)and(18,5)
What is a though shot
PLEASE ANSWER!! WILL GIVE BRAINLIEST!
how does a letter the write way is supposed too look
Michael’s haircut was 14.00 he gave a tip of 3.50 what percentage did Michael leave as a tip 10% 15% 20% 25%
6)What is heat of vaporization? A. It is the heat required to change a substance’s temperature by 1°C. B. It is the heat required to change a gram of substanc
if 1 gallon is 16 cups how many pints are in 24 gallons of juice