Question: 6. Suppose that E is a Java enumeration declared as follows: enum E.) where the enumeration constants are not shown. Also assume that a is

 6. Suppose that E is a Java enumeration declared as follows:

6. Suppose that E is a Java enumeration declared as follows: enum E.) where the enumeration constants are not shown. Also assume that a is an array of integers whose length is equal to the number of enumeration constants in E. Write a loop that displays each constant in E along with the corresponding element of a. For example, suppose that the enumeration constants are SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY, in that order, and that the elements of a are 63, 65, 65, 64, 70, 69, and 68. The loop should produce the following output: SUNDAY: 63 MONDAY: 65 TUESDAY 65 WEDNESDAY: 64 THURSDAY: 70 FRIDAY: 69 SATURDAY: 68

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!