Content deleted Content added
ClueBot NG (talk | contribs) m Reverting possible vandalism by 186.28.232.2 to version by NewEnglandYankee. Report False Positive? Thanks, ClueBot NG. (3160181) (Bot) |
|||
Line 83:
where <code>pos</code> is an object with three properties <code>pos.x</code>, <code>pos.y</code> and <code>pos.z</code>. Then <code>pos</code> cannot be assigned to, but the three properties can, unless they are final themselves.
Like full [[immutability]], the use of final variables has great advantages, especially in optimization. For instance, <code>Sphere</code> will probably have a function returning its volume; knowing that its radius is constant allows us to [[Memoization|
Though it appears to violate the <code>final</code> principle, the following is a legal statement:
|