hey ... good question there ...even i was confused for a while coz the code is kind of complex and lengthy ..... u see ... in line //7 and //8 ....the only thing u gotta look at ..is ... the local class declared just before //1. is inside a non static code/method ...so u can use "this" keyword there ....however ...at //17 and //18 .. the class is declared in a static context and thus doesnt belong to any object ....so u cant use the "this" keyword there ... .it would be really good if u run this in ur system ...it would give u a compilation errror stating the use of this ...i guess ... so bottomline ... this cant be used in a static context ....there the problem lies ..... gottit .... if no ...plz mail me ...willl send a detailed answer ..... try a few more examples also ...untill u get very comfetable with these inner classes .....i would also recommend u go through the campfire stories in this site ... there is one story that deals with inner classes ....really cleared my doubts