Fichas
Enums
Fichas del conjunto (11)
- 1Enums An Enum is a type whose fields consist of a _____ _____ _____ _____An Enum is a type whose fields consist of a fixed set of contraints
- 2Enums Because they are constants, the names of an enum's field are in _____ lettersuppercase
- 3Enums You define an enum type by using the keyword _____ for example...enum
public enum day{
SUNDAY, MONDAY, TUESDAY WEDNESDAY, THURSDAY, FRIDAY, SATURDAY} - 4Enums When should you use an enum?Anytime you need to represent a constant
- 5Enums What is a constant? e.g...Something that will never, or very rarely, change
e.g. Days, Compass Points - 6Enums What are natural enums? e.g...Enums that are to do with nature, and will not change
e.g. Planets - 7Enums You should use an enum when there are data sets where you know all the possible values at _____ _____Compile Time
- 8Enums Which programming language has much more powerful enums than other languages?Java
- 9Enums The enum declaration defines a _____ called an _____ _____The enum declaration defines a class called an enum type
- 10Enums The enum class body can include _____ and other _____The enum class body can include methods and other fields
- 11Enums The compiler automatically adds some special methods when it creates an enum such as the static _____ method that returns an _____ containing all of the values of the enum in the order they are declaredThe compiler automatically adds some special methods when it creates an enum such as the static VALUES method that returns an ARRAY containing all of the values of the enum in the order they are declared
Información
- Descripción
- Masters of Science Programming 2 Fichas sobre Enums, creado por Nathan Hunsdale el 31/05/2014.
- Creado por
- Nathan Hunsdale · may 2014
- Actualizado
- 19 feb 2016
- Visitas
- 20
- Valoración