1 19 20 package org.netbeans.test.codegen; 21 22 26 public class EnumFacilityName { 27 public enum UkrainianNames { 28 ALEKSANDRA("defender of man"), ANICHKA("grace"), IONNA("gift of God"), KATRYA("Katherine"), ORYNKO("peace"), SOFIYA("wisdom"); 29 30 String description; 31 32 public UkrainianNames(String description) { 33 this.description = description; 34 } 35 36 public String getDescription() { 37 return description; 38 } 39 } 40 41 public void mainf(String [] args) { 42 System.out.println("SOFIYA: " + UkrainianNames.SOFIYA.getDescription()); 43 System.out.println("ANICHKA: " + UkrainianNames.ANICHKA.getDescription()); 44 } 45 } 46 | Popular Tags |