public class TestUtilities
2: import java.util.Scanner;
4: /**
5: * A program to test the printTitle and printParagraph methods of the
6: * Utilities class.
7: *
8: * @author Mark Young (A00000000)
9: */
10: public class TestUtilities {
12: public static void main(String[] args) {
13: Utilities.printTitle("Utilities Demo");
14: Utilities.printParagraph("This program demonstrates "
15: + "the Utilities class.");
16: Utilities.printParagraph("This paragraph was produced "
17: + "by the printParagraph method.");
18: Utilities.printParagraph("This paragraph was also produced "
19: + "by the printParagraph method. "
20: + "It is quite a bit longer than the one above, "
21: + "and so it needs to be \"wrapped\" on the screen. "
22: + "The printParagraph method does this for us automatically, "
23: + "so we don't need to worry about where to insert "
24: + "those annoying \\n characters. "
25: + "SO much easier!");
26: }
28: }
30: /* OUTPUT:
32: Utilities Demo
33: --------------
35: This program demonstrates the Utilities class.
37: This paragraph was produced by the printParagraph method.
39: This paragraph was also produced by the printParagraph method. It is quite a
40: bit longer than the one above, and so it needs to be "wrapped" on the screen.
41: The printParagraph method does this for us automatically, so we don't need to
42: worry about where to insert those annoying \n characters. SO much easier!
44: */