Object () { //<--- MOVE THIS UP int c; Runnable runnable = new Runnable() { public void run() { //To change body of implemented methods use File | Settings | File Templates. } }; @Nullable int g; return null; }