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

express the confidence interval 0.38 p 0.54 in the form of p^ ± e
which three nations first colonized North America
what is the value of y
How do variables help you model real-world situations? Give an example of a model that uses variables and explain how it helps people make predictions.
The price of an item has been reduced by 15% . The original price was $51 .
Find the probability of at least 2 girls in births. Assume that male and female births are equally likely and that the births are independent events. Round to t
The visceral and parietal pleural membranes are normally held together by
What was life like for puritan children?
Write an Equation for line through (4,9), m=-9
Describe the relationship between the rights of the individual and the rights of the overall society