dumb question

this is gonna be a dumb question, but i was wondering if there was any way to change a final variable without making it non final.... i need to refer to a non final variable inside an inner class defined in a different method
[239 byte] By [javabingea] at [2007-10-3 3:18:40]
# 1

No. Final is final. If you need to change the value of it at any point, then it shouldn't be final. What are you trying to do? Some code would make things clearer. I think you're referring to the difficulty of referring to variable defined in the parent class from within the inner class, so you've gone and made the variable you want to access final. Could you make it static non-final? Or maybe you really need to pass a reference to the variable into your inner class's constructor.

Brian

brian@cubik.caa at 2007-7-14 21:10:28 > top of Java-index,Java Essentials,Java Programming...
# 2
ok thank you
javabingea at 2007-7-14 21:10:28 > top of Java-index,Java Essentials,Java Programming...