Java Tutorial 7: Working with constants, also known as enumerations (enum)

preview_player
Показать описание
In this tutorial, Dr. Todd Wolfe demonstrates how to handle constants in a Java program. This tutorial shows how to establish a variable to hold constants in an enumeration (enum) and work with them. At the end of this tutorial, you will know how to :

1) Create an enumeration to store constants
2) Set a variable equal to one of the values
3) Loop through the values in the enumeration
4) Check the position (Ordinal) of the variable
5) Compare two variables locations in an enumeration
Рекомендации по теме
Комментарии
Автор

Thanks, this was useful to learn what is possible with enums

styyxofficial