Question: Write a program that uses Enumerated Types fields and constructor, and prints the fields for each constant in the enum. E.g., enum Company { COMPANY1(10),
Write a program that uses Enumerated Types fields and constructor, and prints the fields for each constant in the enum.
E.g., enum Company { COMPANY1(10), COMPANY2(20), COMPANY3(100) };
Output:
Company1 has 10 employees.
Company2 has 20 employees.
Company3 has 100 employees.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
