<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Immutable object - Page 4 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Immutable_object&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Immutable_object&amp;p=5">3.Next</a>
</p>
<p>value of <a href="page.php?w=pi">pi</a> to several decimal places.</p>

<p>Read-only fields may be calculated when the program runs (unlike constants, which are known beforehand), but never change after they are initialized.</p>

<p><big> Weak vs strong immutability </big></p>
<p>Sometimes, one talks of certain fields of an object being immutable. This means that there is no way to change those parts of the object state, even though other parts of the object may be changeable (weakly immutable). If all fields are immutable, then the object is immutable.</p><p>
<a accesskey="1" href="page.php?w=Immutable_object&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Immutable_object&amp;p=5">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
