I called print3("word") once and got three outputs"word word word", but I need to call print3("word") twice and get three output words ("word word word").
package com.codegym.task.task02.task0219;
/*
Print three times
*/
public class Solution {
public static void print3(String s) {
System.out.print(s + " ");
System.out.print(s + " ");
System.out.print(s + " ");
//write your code here
}
public static void main(String[] args) {
print3("word");
}
}