Ask Question
15 August, 17:40

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.

+2
Answers (1)
  1. 15 August, 18:09
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers