I recently ran into this error that took me quite a while to figure out.
I thought I should post it on here in case someone else might run into it too, though the probability of that might be extremely low (see below).
I recently started using enum in Java, as follows
public enum State {
ON, OFF
}
And then, in my object, which extends from Thread, there is a variable called state:
public class Example extends Thread {
private State state;
public Example() { state = State.OFF; } // initialize object at OFF state
This will however gives an error at compile time as such:
./Example.java:3: error: cannot find symbol
state = State.OFF;
^
symbol: variable OFF
location: class State
1 error