diff --git a/Doc/Sd1/languageFundamentals.xml b/Doc/Sd1/languageFundamentals.xml index 9d63ea4a0d77fe62397d2ab82b8b180f695719dd..1c78d37967ee1d77e0d6422bdc9ff26f88df0c27 100644 --- a/Doc/Sd1/languageFundamentals.xml +++ b/Doc/Sd1/languageFundamentals.xml @@ -3152,15 +3152,16 @@ System.out.println("Maximum short value:" + MAXIMUM);</programlisting> MAXIMUM = 0B00000000_00000000_01111111_11111111; ...</programlisting> - <para>The second 0B01111111_11111111 <code language="java" + <para>The second <code language="java" xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.1-100-C">int</code> - literal representing 32767 is perfectly assignable to a <code - language="java" + literal 0B01111111_11111111 representing 32767 is perfectly + assignable to a <code language="java" xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.1-100-B">short</code> - variable representing its maximum value as being intended.</para> + variable representing its maximum possible value as being + intended.</para> - <para>On the contrary the binary <code language="java">int</code> - value <code + <para>On the contrary the four-byte two complement <code + language="java">int</code> value <code language="java">00000000_00000000_10000000_00000000</code> evaluates to <inlineequation> <m:math display="inline"> @@ -3170,9 +3171,11 @@ System.out.println("Maximum short value:" + MAXIMUM);</programlisting> <m:mi>15</m:mi> </m:msup> </m:math> - </inlineequation> (equal to 32768) rather then the intended - two-byte two-complement <code language="java">short</code> value - -32768 (or <inlineequation> + </inlineequation> (equal to 32768). But omitting the two + leftmost bytes consisting of zero values the remaining two-byte + two complement short value <code + language="java">10000000_00000000</code> represents -32768 (or + <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>-</m:mo> @@ -3186,8 +3189,7 @@ System.out.println("Maximum short value:" + MAXIMUM);</programlisting> </m:math> </inlineequation>).</para> - <para>Avoiding this error requires representing the value - <inlineequation> + <para>Avoiding this error requires representing <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>-</m:mo>