Hello there, my solution works in IJ but does not get validated on here. Please could someone let me know what is wrong with my solution?
Many thanks.
package com.codegym.task.task06.task0611;
/*
StringHelper class
*/
public class StringHelper {
static String result = "";
public static String multiply(String s) {
int i = 0;
while (i != 5) {
i++;
result+=s;
}
return result;
}
public static String multiply(String s, int count) {
int i = 0;
if (i==count) {
result = "";
} else {
result = "";
while (i != count) {
i++;
result += s;
}
}
return result;
}
public static void main(String[] args) {
}
}