Question: 1. Create a new enum called DayOfTheWeek 2. Initialize it with th 7 days of the week (2 letter abbreviations are fine) 3. In the

1. Create a new enum called

DayOfTheWeek

2. Initialize it with th 7 days of the week (2 letter abbreviations are fine)

3. In the main method create a varaible called firstDay. It is of the type DayOfTheWeek.

Assign it the appropriate value.

4. Print the variable firstDay

followed by an empty line

5. Use a loop to list all enum constants of class

DayOfTheWeek

separated by a single blank

When you are done add an empty line (see output)

Output:

First day: SU

SU MO TU WE TH FR

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!