Question: What is not a key advantage of using an enum as below have versus using a string for myCar and string literals like red, green,
What is not a key advantage of using an enum as below have versus using a string for myCar and string literals like "red", "green", and "black"?The compiler will yield an error for an unsupported color like BLUE
The possible colors are made explicit
Capital letters can be used to make the colors clearer
The compiler will yield an error for a misspelled color like GREN
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
