Ask Question

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 new line) consisting of five periods.

+2
Answers (1)
  1. 14 May, 15:49
    0
    public static void printDottedLine ()

    {

    System. out. println (" ... ");

    }

    Explanation:

    The above written code is in JAVA and it is the method definition of the method mentioned in the question. Since the method returns nothing hence it's return type is void and it does not have any arguments hence there is nothing written in the parenthesis. In JAVA System. out. println is used for standard output and trminates them by newline.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write the definition of a method printDottedLine, which has no parameters and doesn't return anything. The method prints to standard output ...” 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