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

A uniform wire is cut into 4 segments. Each segment is twice as long as the earlier segment. If the shortest segment has a resistance of 4 ohm, find the resista
please help :-( thanks
What Should I Know About Nigeria?
Find the explicit formula that produces the given sequence. 3/2, 3/4, 3/8, 3/16,...
in che anno e nato Cristoforo Colombo
Which statement accurately describes the Battle of Marathon?   A. Athens fought alone against Darius's army and decisively defeated the Pers
Q: What is the indicated term of the arithmetic sequence? someone help!!!! a14 for 200,196,192... A: a. 148 b. 252 c. 144 d. 239
Can someone tell me what is a Genre?
Rheumatic fever is a bacterial disease that can result in degeneration of heart valves that would cause?
A uniform wire is cut into 4 segments. Each segment is twice as long as the earlier segment. If the shortest segment has a resistance of 4 ohm, find the resista