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

If you invest $7900 in an account that pays an annual percentage rate (APR) of 11%, and the interest is compounded monthly, what is the total amount of money th
How to solve : 16=2t + 0.25 t``squar​
How does chemical weathering differ from mechanical wheathering
Which of Dalton's five principles still hold true?
Which of the following occurs during a redox reaction? A. Only electrons are obtained B. Only electrons are lost C. Electrons are won and lost D. Electrons are
write the solution in set builder notation -2(2x+8)>-16-4x
How does the structure of DNA determine the structure of proteins?
Give examples of thermal and electrical conductors.
find the value of a and b a^2 + b^2 = 400
A number doubled then increases by three is more than 6 but less than 20. Write and solve an inequality that represents this scenario.