Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

fields with final keywords can be reassigned..?



Hi folks,
I have a question regarding the final modifier.

We all know the System class has the out, err, in static & final objects defined.

We can get the (out, err, in) Stream objects redirected any other using the System.setOut(), setErr() and setIn method and I could see the objects are getting changed once we do invoke these System.setXXX()methods.
Is it contradictory to what we have seen with the key word final.
I could see the Native implementations for the System.setXXX methods, in the JAVA src code.

Can anyone put some light on this.

Looking forward to see your valuable comments.

Regards,
kk