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

Find the error Jacob is finding the slope of the line that passes through x(0,2) and y(4,3).circle his mistake and correct it.
How are radioactive probes useful in DNA fingerprinting
The perimeter of a parallelogram is 46in. If the length of one side is 14in., what is the length of a side adjacent to it?
If, 2=5 3=10 4=17 5=??
The perimeter of a parallelogram is 46in. If the length of one side is 14in., what is the length of a side adjacent to it?
What is Neons group and periodic number?
The perimeter of a parallelogram is 46in. If the length of one side is 14in., what is the length of a side adjacent to it?
How are radioactive probes useful in DNA fingerprinting
Eleni is n years old. In thirteen years she will be twenty four years old-
How are radioactive probes useful in DNA fingerprinting