Monday, 25 April 2016

Can we declare enum inside an interface ?


Yes, in this case interface will just be used as a namespace for the enum.

Example
public interface MyInterface {
    public enum Status {
        OKKO, TECH_ERROR;
    }
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.