String (String @NotNull [] strings, int startIndex, int endIndex, @NotNull String separator) { StringBuilder result = new StringBuilder(); for (int i = startIndex; i < endIndex; i++) { if (i > startIndex) result.append(separator); result.append(strings[i]); } return result.toString(); }