Skip to content
Snippets Groups Projects
Commit 0acdc87c authored by Goik Martin's avatar Goik Martin
Browse files

Typo

parent 834514e3
No related branches found
No related tags found
No related merge requests found
...@@ -1104,9 +1104,9 @@ System.out.println("New value=" + a);</programlisting> ...@@ -1104,9 +1104,9 @@ System.out.println("New value=" + a);</programlisting>
System.out.println(area); System.out.println(area);
}</programlisting> }</programlisting>
<para>Though there is nothing wrong with this approach but it may <para>Though there is nothing wrong with this approach it actually
be considered error prone. A careless programmer may accidentally is error prone: A careless programmer may accidentally redefine
redefine the value of <code>pi</code>:</para> the value of <code>pi</code>:</para>
<programlisting language="noneJava"> public static void main(String[] args) { <programlisting language="noneJava"> public static void main(String[] args) {
...@@ -1167,9 +1167,9 @@ System.out.println("New value=" + a);</programlisting> ...@@ -1167,9 +1167,9 @@ System.out.println("New value=" + a);</programlisting>
definition of our variable <code>area</code> to avoid erroneous definition of our variable <code>area</code> to avoid erroneous
redefinitions as well.</para> redefinitions as well.</para>
<para>As a rule of thumb: Whenever you expect a variable not to <para>As a rule of thumb: Whenever you intend a variable not to
change after initial assignment use <code>final</code> to declare change after an initial assignment use <code>final</code>
it as being constant.</para> declaring it to remain constant.</para>
</answer> </answer>
</qandaentry> </qandaentry>
</qandadiv> </qandadiv>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment