Добрый день. Не понимаю почему не принимает последние 2 условия. Через main выводит. Подскажите пожалуйста, на что обратить внимание?
package com.javarush.task.task06.task0611;
/*
Класс StringHelper
*/
public class StringHelper {
public static String multiply(String s) {
String result = "";
for (int x = 5; x > 0; x--) {
result=result+"Амиго";
}
return result;
}
public static String multiply(String s, int count) {
String result = "";
for (; count>0; count--){
result=result+"Амиго";
}
return result;
}
public static void main(String[] args) {
System.out.println(multiply("",3));
System.out.println(multiply(""));
}
}