In this lecture, we examine enumerations in Java: what an
enum is, how to declare and where to place it, how to use it together with
switch, iterate values via
values(), and also apply methods
name(),
ordinal(),
valueOf(). We will look at advanced capabilities (
fields,
constructors,
methods), go through a practical example, and typical mistakes.