lunes, 15 de junio de 2015

Enum

Enum types: An enum type is a special data types that enables for a variable to be a set of predefined constants. The variblae must be equal to one of the values that have been predefined for it.
Because they are constants, the name of an enum type's field are in uppercase letters.
We define an enum type by using the enum keyword.
We should use enum types any time we need to represent a fixed set of constants when we know all possible values at compile time.

Create our "Enum" type



Create our class where look for elements using the enum type





Identify the elements on page 



This is our test class















No hay comentarios:

Publicar un comentario