“Variable example might not have been initialized” in anonymous class
This occurs because of the way that anonymous classes are implemented. You can see this if you make a slight change to the code and then decompile: final Runnable other = null; final Runnable example = new Runnable() { @Override public void run() { System.out.println(other); } }; i.e. make the anonymous class refer to a … Read more