Question: Assume the enumeration below is in a Java program. enum Shape { TRIANGLE , RECTANGLE, SQUARE, PENTAGON, CIRCLE } How many times would the body
Assume the enumeration below is in a Java program.
enum Shape TRIANGLE RECTANGLE, SQUARE, PENTAGON, CIRCLE
How many times would the body of the loop below execute?
forShape s : Shape.values
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
