Define an enumeration for each of the months in the year. Use a for-each statement to display each month.

What will be an ideal response?


```
enum Month {JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC}
for (Month nextMonth : Month.values())
System.out.print(nextMonth + " ");
System.out.println();
```

This code is in Fragments.java.

Computer Science & Information Technology

You might also like to view...

The ISO committee began to standardize the C++ language is 1994, but didn’t deliver the “final” standard until November, 1997. Why do you think that it took several years to complete this task?

What will be an ideal response?

Computer Science & Information Technology

You define a(n) ________ list on a value such as text, numbers, dates or time

Fill in the blank(s) with correct word

Computer Science & Information Technology

An SSD drive generally has equal storage capacity of a mechanical drive for a comparable cost

Indicate whether the statement is true or false

Computer Science & Information Technology

If a key pair is generated at a local computer, it is considered to be decentralized

Indicate whether the statement is true or false

Computer Science & Information Technology