Enum – Enumeration Types
The last class we will look at here is the Enum
class which supports operations on sequentially ordered types. We have already used this class in [1..3]
for creating a list of elements from 1
to 3
.
We do not have to worry about the implementation details of the Enum class at this point, but we can see that with an Enum
class, we have access to the [..]
methods which can be very useful.
Last updated