How to create enum with numbers? And how to compare them with each other?
PS I had a "rating" system, which was in numbers 1, 3, 9 . More precisely, there was an ArrayList with class objects, in this class there was a field with a rating.
At the end, the rating of different objects was compared and selected with the highest rating.
I was advised to "hold" the rating using enum . But something to create enum with numbers does not work, as in this example, too.
How can I do that?