java - How is "this" used when it comes after a Class like this? -
i don't quite understand how keyword this
being used in instance.
private void checkforcomodification() { // i'm concerned first 1 if (cyclicarraylist.this.modcount != this.modcount) throw new concurrentmodificationexception(); }
you need in inner classes.
this
points inner class instance itself.
myouterclass.this
points containing class instance.
in case, necessary, because both classes have modcount
property (and 1 outer class cyclicarraylist
shadowed here).
Comments
Post a Comment