Data Type : Enum

Enumeration

  • enum type is a distinct value type that declares a set of named constants
  • It can decrease the possibility of using or reading wrong data
  • It can exclude the possibility of duplicated data
  • If we don’t declare an underlying data type, the default data type is ‘int’
스크린샷 2018-05-03 오후 2.54.19
Declaration of Enum
스크린샷 2018-05-03 오후 2.55.11
Usage of Enum
ec8aa4ed81aceba6b0ec83b7-2018-05-03-ec98a4ed9b84-2-56-471-e1525373933600.png
Enum | Result

 

Leave a comment