If you compile this with javac, it will complain:

Blah.java:6: local variable x is accessed from within inner class;
needs to be declared final
            private int i = x;
                            ^
1 error

If you change the declaration to "final int x = 27", it succeeds.

yes, i understand the principle and that it works.

i just wasn't previously aware of that usage of "final", is all. seems a bit odd!


--
jason.vp.engineering.particle

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to