diff --git a/Doc/Sd1/coreClasses.xml b/Doc/Sd1/coreClasses.xml index 2be70850ff995eff9b8d0d942ab808e21191dad2..ab575694f22bf59c46dbacadba6e20061df8ca80 100644 --- a/Doc/Sd1/coreClasses.xml +++ b/Doc/Sd1/coreClasses.xml @@ -67,16 +67,15 @@ xlink:href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html#syntax">format strings</link> inside the first argument. It uses the <acronym>varargs</acronym> mechanism being described in the - <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc2_html_5#toc2">Java - classes section of chapter 4</link>.</para> + <xref linkend="glo_Java"/> classes section of chapter 4 of + <xref linkend="bib_Kurniawan2015"/>.</para> </listitem> <listitem> - <para>There is a one to one correspondence between each %... - format string and a corresponding argument. Thus if n further - arguments exist the format string must contain at least n - <quote>%</quote> format specifiers.</para> + <para>There is a one to one correspondence between each + <code>%...</code> format string and its corresponding + argument: If n further arguments exist the format string must + contain n <quote>%</quote> format specifiers.</para> </listitem> </orderedlist> @@ -160,11 +159,9 @@ java.util.IllegalFormatConversionException: <emphasis role="bold">d != java.lang replacing your own variable <code>pi</code>'s definition .</para> <tip> - <para>You may want to read the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc11_html_2">Static - Members</quote> and <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc6_html_4">Java - Packages</quote> sections .</para> + <para>You may want to read the <quote>Static Members</quote> and + <quote>Java Packages</quote> sections of <xref + linkend="bib_Kurniawan2015"/>.</para> </tip> </question> @@ -184,7 +181,7 @@ java.util.IllegalFormatConversionException: <emphasis role="bold">d != java.lang expression rather than just using <varname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#PI">PI</varname> itself some syntactic sugar is on offer by means of a <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc13_html">static + xlink:href="https://docs.oracle.com/javase/1.5.0/docs/guide/language/static-import.html">static import</link> statement:</para> <programlisting language="java" linenumbering="unnumbered"><emphasis @@ -406,7 +403,7 @@ public class CircleAreaCalculator { <para>The <classname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html">String</classname> class does contain a method returning the <code - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-2-language-fundamentals/toc3_html_3">char</code> + xlink:href="https://docs.oracle.com/javase/tutorial/java/data/characters.html">char</code> value at a given index. Read the documentation to find it.</para> </listitem> @@ -516,13 +513,13 @@ public class CircleAreaCalculator { actually 2,700,507,600. This exceeds <code xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#MAX_VALUE">MAX_VALUE</code> of 2,147,483,647 <link - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-2-language-fundamentals/toc3_html_3">being + xlink:href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">being representable by a 4 byte <code>int</code> variable</link>.</para> - <para>Luckily a <code>long</code> variable <link - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-2-language-fundamentals/toc3_html_3">will - be able to hold positive values up to - 9,223,372,036,854,775,807</link>. This is much larger than our + <para>Luckily a <code>long</code> variable will be able to hold + positive values <link + xlink:href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">up + to 9,223,372,036,854,775,807</link>. This is much larger than our <quote>worst case</quote> 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 × 9 = 2,541,865,828,329 value. We thus change our data type from <code>int</code> to <code>long</code>:</para> diff --git a/Doc/Sd1/languageFundamentals.xml b/Doc/Sd1/languageFundamentals.xml index f923c0d8d2144c81bf1dbd15fc5c229a844b87fd..6d661c561c58d53e371cdf1589b54c0a61729189 100644 --- a/Doc/Sd1/languageFundamentals.xml +++ b/Doc/Sd1/languageFundamentals.xml @@ -545,9 +545,9 @@ System.out.println(count + ":" + Count);</programlisting> <question> <para>Which of the following names are legal variable names? Complete the following table and explain your decision with - respect to the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc4_html_3">variables</quote> - section.</para> + respect to the <quote>Language Fundamentals</quote> / + <quote>variables</quote> section of <xref + linkend="bib_Kurniawan2015"/> .</para> <informaltable border="1"> <colgroup width="19%"/> @@ -1505,10 +1505,10 @@ int i = (int) d; // Explicit cast double to int</programlisting> xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.1-100-C">int</code> literals</link> in <link xlink:href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-BinaryNumeral">binary - representation</link> like e.g. <code>0B1100</code> in section - <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc6_html_2">Literals</quote> - in order to write an <code + representation</link> like e.g. <code>0B1100</code> in the + <quote>Language Fundamentals</quote> / <quote>Literals</quote> + section of <xref linkend="bib_Kurniawan2015"/> in order to write + an <code xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.1-100-C">int</code>'s minimum and maximum possible value to standard output.</para> @@ -2387,10 +2387,10 @@ System.out.println('&' + ": " + ((int) '&')); }</programlisting> <tip> - <para>You may want to consider the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc6_html_2">Literals</quote> - section of <xref linkend="bib_Kurniawan2015"/> learning about - hexadecimal integer value representation.</para> + <para>You may want to consider the <link + xlink:href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">Primitive + Data Types</link> section learning about hexadecimal integer + value representation.</para> </tip> </question> @@ -2888,9 +2888,9 @@ System.out.println("Decimal:" +<co linkends="sd1ListingPlusOpDuplicate-1" <tip> <para>Hunt for <quote>java escape double quote</quote> and read - about <link - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-2-language-fundamentals/toc6_html_2#readertoolbar2">character - literals</link>.</para> + about character literals in the <quote>Language + Fundamentals</quote> / <quote>Literals</quote> section of <xref + linkend="bib_Kurniawan2015"/>.</para> </tip> </question> @@ -4042,9 +4042,8 @@ System.out.println("New value=" + a);</programlisting> </orderedlist> <tip> - <para>You may want to read the <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc1_html_4">overview - section</link> on statements.</para> + <para>You may want to read the <link>overview section</link> on + statements in <xref linkend="bib_Kurniawan2015"/>.</para> </tip> </question> @@ -4506,9 +4505,8 @@ System.out.println("Difference: " + difference);</programlisting><screen>Differe }</programlisting> <tip> - <para>You may want to read the <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc1_html_4">overview - section</link> on statements.</para> + <para>You may want to read the <link>overview section</link> on + statements in <xref linkend="bib_Kurniawan2015"/>.</para> </tip> </question> @@ -4601,11 +4599,10 @@ System.out.println("A circle of radius " + radius + " will cover an area of " + </listitem> <listitem> - <para>Read the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc5_html_2">Constants</quote> - section of <xref linkend="bib_Kurniawan2015"/>. As an aside - also read the nearby section concerning naming conventions - for constant variable as well.</para> + <para>Read the <quote>Constants</quote> section of <xref + linkend="bib_Kurniawan2015"/>. As an aside also read the + nearby section concerning naming conventions for constant + variable as well.</para> </listitem> </itemizedlist> </tip> @@ -4684,11 +4681,10 @@ System.out.println("A circle of radius " + radius + " will cover an area of " + </listitem> <listitem> - <para>Read the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc5_html_2">Constants</quote> - section of <xref linkend="bib_Kurniawan2015"/>. As an aside - also read the nearby section concerning naming conventions - for constant variable as well.</para> + <para>Read the <quote>Constants</quote> section of <xref + linkend="bib_Kurniawan2015"/>. As an aside also read the + nearby section concerning naming conventions for constant + variable as well.</para> </listitem> </itemizedlist> </tip> diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 24fd7e74945c91405427893fe8a1d29ccfcae90b..9499f336aaa09e97acc8f653b563316a3de79fde 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -1385,9 +1385,8 @@ Rectangle individual = new Rectangle(2, 7); // 2 x 7</programlisting></td> <qandadiv> <qandaentry> <question> - <para>Extend the <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc2_html_5">Employee - example from chapter 4</link> by adding two methods:</para> + <para>Extend the Employee example from chapter 4 of <xref + linkend="bib_Kurniawan2015"/> by adding two methods:</para> <itemizedlist> <listitem> @@ -1513,9 +1512,10 @@ Salary:30000.00</pre> resolved?</para> <tip> - <para>Read the <link - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-4-objects-and-classes/toc8_html_3">section - about the <quote>this</quote></link> keyword.</para> + <para>Read the section in <xref + linkend="bib_Kurniawan2015"/> about the <quote + xlink:href="https://docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html">this</quote> + keyword.</para> </tip> </question> @@ -2360,9 +2360,9 @@ public class Driver { } }</programlisting> - <para>This error is in accordance with Table 4.1 from the <link - xlink:href="https://techbus.safaribooksonline.com/9780992133047/toc7_html_3">Encapsulation - and Access Control</link> section: The attributes + <para>This error message is in accordance with Table 4.1 from + the Encapsulation and Access Control section of <xref + linkend="bib_Kurniawan2015"/>: The attributes <property>age</property> and <property>salary</property> have no access modifiers at all hence <quote>default</quote> access is being granted. Default access type prohibits classes belonging diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index 17cb080142df710e7386a13ed372cbc36ed6bb99..9205b26d95c03074f8072a911a8aa5a654de6e51 100644 --- a/Doc/Sd1/statements.xml +++ b/Doc/Sd1/statements.xml @@ -875,9 +875,8 @@ You entered 1234567</screen> <para>You will fully understand the above expression <classname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html">Math</classname>.<methodname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#min-int-int-">min(...)</methodname> - after finishing the <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc12_html">Static - Final Variables</quote> section.</para> + after finishing the <quote>Static Final Variables</quote> section + of <xref linkend="bib_Kurniawan2015"/>.</para> </answer> </qandaentry> </qandadiv> @@ -4350,8 +4349,8 @@ try (final Scanner scan = new Scanner(System.in)) { divisible by all of the numbers from 1 to 20?</para> <tip> - <para>The operator <quote - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc8_html">%</quote> + <para>The remainder operator <quote + xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.17.3">%</quote> allows for testing whether a given integer value <code>n</code> can be divided by an another integer value <code>k</code> without remainder.</para>