On Friday, 03/07/2003 at 05:15 EST, "Santiago Pericas-Geertsen"
<[EMAIL PROTECTED]> wrote:
> > This is why String and the primitive objects
> > such as Integer and Double are declared final. Otherwise you could
> > simply subclass the object and do what you want, which would mean that
> > you would have to make a copy of every String that you wanted to hold
on
> to.
>
> I agree with your comments, except for the one above. What do you mean
"do
> what you want"? Instance variables in those classes are private.
Sure, but you could replace them with other instance variables by
overriding methods and create a back door. In some specific places, Final
is a valid security measure.
But that's orthogonal to what it's being used for here.
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"may'ron DaroQbe'chugh vaj bIrIQbej" ("Put down the squeezebox and nobody
gets hurt.")