Can't figure out why the last two tasks aren't accepting it. It prints the words on repeat but I am missing something according to the last list.
package com.codegym.task.task06.task0611;
/*
StringHelper class
*/
public class StringHelper {
public static String multiply(String s) {
String result = "";
//write your code here
for(int i=1; i<6; i++){
System.out.print(s);
}
return result;
}
public static String multiply(String s, int count) {
String result = "";
//write your code here
for(int i=1; i<count; i++){
System.out.print(s);
}
return result;
}
public static void main(String[] args) {
String s = "Amigo";
System.out.println(multiply(s, 2));
System.out.println(multiply(s));
}
}