Ask Question
19 October, 09:21

my homework guides Write the definition of a method printDottedLine, which has no parameters and doesn't return anything. The method prints to standard output a single line (terminated by a newline) consisting of five periods.

+3
Answers (1)
  1. 19 October, 11:48
    0
    public static void printDottedLine () {

    System. out. print (" ... / n");

    }

    Explanation:

    This method returns nothing so its return type is void

    It also accepts no parameters so the argument list is empty

    When called it executes the System. out. print (" ... / n"); which prints out 5 dots

    See a complete program below:

    public class TestClock {

    public static void main (String[] args) {

    printDottedLine ();

    }

    public static void printDottedLine () {

    System. out. print (" ... / n");

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “my homework guides Write the definition of a method printDottedLine, which has no parameters and doesn't return anything. The method prints ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers