Java enums, static class variables - why can't I do this?

Posted by drozzy on Stack Overflow See other posts from Stack Overflow or by drozzy
Published on 2010-05-25T15:08:54Z Indexed on 2010/05/25 15:11 UTC
Read the original article Hit count: 252

Filed under:
|

I am getting a "cannot be resolved" error when I try to do this:

class Tag{
   public static final int blah = 1231; 
}

enum Things{
    COOL (Tag.blah, "blah"); //error here
}

the compiler complains that it cannot find the Tag class on the line above.

© Stack Overflow or respective owner

Related posts about java

Related posts about enums