enum Color {RED, GREEN, BLUE}public class EnumOrdinal{    public static void main(String[] args)   {
     ---Code here---     ---Code here---     ---Code here---
    }}The above code demonstrates the use of the enum ordinal() method to get the ordinal value of an enum constant. Fill in the indicated lines with println() statements that will get the ordinal of the enumeration constant. Describe the output that will display when the code is executed.

What will be an ideal response?


System.out.println("Color.RED  : " + Color.RED.ordinal());System.out.println("Color.GREEN: " + Color.GREEN.ordinal());System.out.println("Color.BLUE : " + Color.BLUE.ordinal());?Output will appear as:?Color.RED  : 0Color.GREEN: 1Color.BLUE : 2

Computer Science & Information Technology

You might also like to view...

The size of the final published SWF file is not an important consideration as you create an animation.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Assume that four jobs, A-D, are in the READY queue at Time 0 and require the CPU cycles listed below. Using the SJN algorithm, the ____ job is run first.Job:             A B C DCPU cycle: 5  2  6  4

A. A B. B C. C D. D

Computer Science & Information Technology

?If you were creating a dataset to represent the amount of rainfall in a month, you would have _____ value(s) in the dataset.

A. ?the total rainfall amount B. ?between 28-31 C. ?daily average D. ?random

Computer Science & Information Technology

A network administrator installs a new web server and notices that the server was configured with one quad-port NIC. In order to properly provision the hardware resources, how should the NIC be configured?

A. Assign at least one IP address to each port B. Assign multiple IP addresses to one port C. Assign one IP address to the quad-port NIC D. Assign a single IP address to all four ports

Computer Science & Information Technology