Well, that's not quite true. Static final fields actually are
final[1]. That means one could create an immutable object by
generating a class and stuffing the values in static fields. Obviously
that's not a viable route to take, but I hear there are bonus points
to be had.. :D

With kind regards
Ben

[1] Of course this does not hold for System.out, System.in and
System.err.

On 25 Nov., 09:19, Kevin Wright <kev.lee.wri...@gmail.com> wrote:
> For bonus points, use JNI and do it in C/C++
>
> Seriously though, all bets are off in the face of reflection.  It can cut
> right through anything marked as final in bytecode, and no immutability
> guarantees made by *any* JVM language can be relied upon when reflection is
> being used to subvert the system.

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

Reply via email to