Jump to content

Talk:Final (Java)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 74.139.221.221 (talk) at 00:53, 29 January 2008 (Created page with 'This page was all wrong about final variables. First, they are not like "const" in C++ since in that language a const field is limited not only to not being reass...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This page was all wrong about final variables.

First, they are not like "const" in C++ since in that language a const field is limited not only to not being reassigned, but there is the additional limitation that only const methods can called on it and it can only be passed as the const argument of other methods.

Second, (non-static) inner classes can freely access any field of the enclosing class, final or not.