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

does 5+4=8 and does 1+1=2​
what is a tropical depression? is it a strong storm????
What factors affect tourism
A rectangular table measures 1 yard by 4 yards. What is the surface area of the table
Which equation would be used to calculate the rate constant from initial concentrations?
What type of figurative language is being used in the sentence?​
Use exponents to write the numbers 81 and 64 in as many different ways as you can. Then write 64/81 using exponents in as many different ways as you can.
Which is the closest antonym for the word simulated? (A)Gimmicky (B)Improvised (C)Vigorous (D)Actual
A house purchased for $226,000 has lost 4% of its value each year for the past five years. What is it worth now? Round your answer to the nearest whole number.
What do all codes, such as Morse code and Braille have in common?