126k views
2 votes
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.

User Ish
by
6.7k points

1 Answer

5 votes

Answer:

public static void printDottedLine()

{

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

}

Step-by-step 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.

User Cabbibo
by
6.3k points