The difference of static and non-static inner classes?
问题 I was reading Effective Java 2 - Item 22 and it says in the title: "Favor static member classes over non-static" but at the end of the chapter Implementations of the collection interfaces, such as Set and List, typically use nonstatic member classes to implement their iterators: // Typical use of a nonstatic member class public class MySet<E> extends AbstractSet<E> { ... // Bulk of the class omitted public Iterator<E> iterator() { return new MyIterator(); } private class MyIterator implements