void () { Runnable r = new Runnable() { @Override public void run() { Comparable<Integer> c = new Comparable<Integer>() { @Override public int compareTo(Integer o) { return 0; } }; } }; class FooLocal { Runnable r = new Runnable() { @Override public void run() { } }; } }