void () { new Runnable() { @Override public void run() { // Invalid warning, because inner class can't access instance method, even if it wanted to. String field = "hello"; System.out.println(field); } }.run(); }