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

simply the variable expression below as much as possible. 7x + (5.6) z
Write a two step equation that has -5 as it solution.
what is the mass of a cannon ball if a force 2500 N gives the cannon ball an acceleration of 200 m/s squared?
Need help anyone who can help plz
Fill in the blank in the following sentence with the appropriate possessive adjective below. (PLEASE HELP NEED ANSWER ASAP)
Why was the Bill of Rights less powerful in the 19th century? The question of rights and freedoms in new states was unresolved. Economic hardships put issues of
harry is trying tq solve the equation y=2x^2 -x-6 using the quadratic formula he has made an error in one of the steps below
Which equation represents the number of inches (i) a snail crawls if it crawls 7.6 inches per hour (h)? How far will the snail crawl in 8 hours?
in what why did the climate and rivers affect the development of ancient china
You have 535 g of Zinc Chloride, ZnCl2. How many moles is this?