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

Please show your work. Find XY
How to solve systems of equations with 3 variables on ti 84?
Is a cool breeze conduction or convection?
Which of the following best describes the overall mood in Frost's poem? gloomy, sunny, cheerful
When half the positive difference between the 13th and 23rd natural numbers is added to the 34th even natural number, what is the result? (The natural numbers a
In your own words, explain why sinkholes are very common in Florida. List one use of sinkholes in Florida.
given tan (0) = 4/3 and sin (0) =-4/5,find cos (0)
From 1945 to 1989, Europe was divided into a communist bloc and a what.
identify the type of conjunction used in the following sentences. 1. the mountain goat lives on the high mountain slopes, but has adapted to the environment. 2
Amniocentesis is a test in which fluid is removed from the uterus so the baby's genetic composition can be determined. true or false