jjzjj

Java Generics GetThis Trick 解释

我正在阅读有关Java泛型的文章,我偶然发现了这个主题,我对此感到有些困惑。发件人:http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ205publicabstractclassNode>{privatefinalListchildren=newArrayList();privatefinalNparent;protectedNode(Nparent){this.parent=parent;parent.children.add(this);//error:incompatib