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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -