Enum

Posted on by Kim

    public enum Sex {
        MALE("M", "Male"), FIMALE("F", "Fimale"), UNISEX("U", "Unisex");

        private final String sex;
        private final String name; // in meters

        Sex(String sex, String name) {
            this.sex = sex;
            this.name = name;
        }

        public String getSex() {
            return sex;
        }

        public String getName() {
            return this.name;
        }
    }

0 Responses to "Enum":