If I understand correctly, you're asking us how to create a String from multiple parts, by concatenating the parts.
Use a StringBuilder:
StringBuilder sb = new StringBuilder();
for (...) {
String part = ...;
sb.append(part);
}
String result = sb.toString();