So I looked into this “enum” type, and it kind of seems like a glorified array/ArrayList/List to me. What exactly is the use of it?
So I looked into this enum type, and it kind of seems like a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Enum serves as a type of fixed number of constants and can be used at least for two things
constant
This is much better than creating a bunch of integer constants.
creating a singleton
You can do quite interesting things with enums, look at here
Also look at the official documentation