sorry for asking such basic question. I am trying some hands on ENUM. below is my code. I am getting some compilation error . Any idea where is the problem. I want SAMPLEMAIL,BULKUSERS,ALLUSERS should be of integer type.
public enum EmailSendingOption { SAMPLEMAIL, BULKUSERS, ALLUSERS; private int emailSendingOptionType; private EmailSendingOption(String optionType) { int value = Integer.parseInt(optionType.trim()); emailSendingOptionType = value; } public int getEmailSendingOption() { return emailSendingOptionType; } } thanks.
enumare not integers in Java, they are objects.