well the reason I have the return type is because that is what it wants me to use so I can't do your first way. Im not sure I can use that builder thing in my code though. I dont believe I've learned it yet. What does it do?
In Java String objects are immutable. That basically means that you can't change the content of a String object. Everytime you call methods that "modift" String content, the program actually creates a new object and assigns it to the object you are trying to modify. String builder is a faster alternative when you need to create String objects by appending characters one by one since it doesn't create a new object everytime. But if you say you can't use StringBuilder I suggest you this approach: