I was wondering if we can access Local variables of an Outer Class's method that has an Inner class. I wrote the following code and I don't know how to do it.I can access the member varible of outer class tho from the inner class tho.
The post you closed was not a duplicate of this one. This post is regarding Method Local Inner Class and that was regarding Anonymous Inner Class. I did not want to post both of em in the same post as there might be some confusion.
Hi. Below is from geekevaluation.com, regarding method local inner class. I know that final variables of methods can only be accessed by its method local inner class. Then why not in below mentioned code?
Here a is final variable only. Still at Line 4, there is a compiler error. Somebody please give me a proper explanation for this. Thanks. [ July 07, 2008: Message edited by: Phal Ach ]
The post you closed was not a duplicate of this one. This post is regarding Method Local Inner Class and that was regarding Anonymous Inner Class. I did not want to post both of em in the same post as there might be some confusion.
Thanks.
Sorry. I re-opened the other one.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, the permaculture playing cards