Learn Java Programming - Enum (Enumerations) Introduction

preview_player
Показать описание
An enumeration, or enum for short, is a special data type that consists of a list of named constants. The number of values that an enum contains is fixed at the time the enum is defined; in other words, you cannot add or remove enum values dynamically throughout your program. Enumerations are quite commonly used to control switch and if statements, but they can be used in other flow control loops as well. You may also hear them referred to as enumerated lists.
Рекомендации по теме