Karteikarten
Enum
Karten in diesem Stapel (3)
- 1What is an enum?- Non primitive data type
- Fixed set of constants. It is static and final.
- All constants are static and final implicitly
- Implicitly extend java.lang.Enum
- implicitly public static and final - 2Declaring an enum- Write the enum variables tall
- As it is static you can access it using the enum name
- Cannot create child enum since it is final
- Cannot declare enum inside a method - 3Methods in enum- values() return all values present inside enum
ordinal() returns the enum constant index
valueOf() returns enum constant of the specified string value
Informationen
- Beschreibung
- Karteikarten am Enum, erstellt von BLU BLU am 29/01/2025.
- Erstellt von
- BLU BLU
- Aufrufe
- 0
- Bewertung