diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 260780e0bbd8e91d498e52fd312322153032c80a..ca0118d682cb4ef390643493266b8282eec4f6c5 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -368,17 +368,34 @@ public class Q {<lineannotation>Class def</lineannotation> <figure xml:id="sd1_fig_importByWildcard"> <title>Don't be too lazy!</title> - <programlisting language="java">//import java.util.Date; -//import java.util.Scanner; + <informaltable border="0"> + <tr> + <th>Bad</th> -import java.util.*; // Bad coding style + <th>Good</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">import java.util.*; public class Q { - public static void main(String[] args) { + public static void main(String[] args) { Scanner s = new Scanner(System.in); Date today = new Date(); } -}</programlisting> +}</programlisting></td> + + <td valign="top"><programlisting language="java">import java.util.Date; +import java.util.Scanner; + +public class Q { + public static void main(String[] args) { + Scanner s = new Scanner(System.in); + Date today = new Date(); + } +}</programlisting></td> + </tr> + </informaltable> </figure> <figure xml:id="sd1_fig_javaDotLangNoImportRequired"> @@ -4143,7 +4160,9 @@ long sum = (long)a + b;</programlisting> <para>This Maven archive does include a <xref linkend="glo_Junit"/> test currently being disabled by an - <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> directive:</para> + <interfacename + xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> + directive:</para> <programlisting language="java">public class FractionTest { /** @@ -4155,7 +4174,9 @@ long sum = (long)a + b;</programlisting> <para>The current skeleton will yield a NullPointerException on test execution. After completing your implementation remove - this <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> directive allowing for test execution.</para> + this <interfacename + xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> + directive allowing for test execution.</para> </question> <answer>