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>
System.out.println(area);
}</programlisting>
<para>Though there is nothing wrong with this approach but it may
be considered error prone. A careless programmer may accidentally
redefine the value of <code>pi</code>:</para>
<para>Though there is nothing wrong with this approach it actually
is error prone: A careless programmer may accidentally redefine
the value of <code>pi</code>:</para>
<programlisting language="noneJava"> public static void main(String[] args) {
......@@ -1167,9 +1167,9 @@ System.out.println("New value=" + a);</programlisting>
definition of our variable <code>area</code> to avoid erroneous
redefinitions as well.</para>
<para>As a rule of thumb: Whenever you expect a variable not to
change after initial assignment use <code>final</code> to declare
it as being constant.</para>
<para>As a rule of thumb: Whenever you intend a variable not to
change after an initial assignment use <code>final</code>
declaring it to remain constant.</para>
</answer>
</qandaentry>
</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