This question is from an assignment. I have to override a toString() method in a class that creates a circularly linked list and I actually have a toString() method that works g
Use StringBuilder.
StringBuilder builder = new StringBuilder(); builder.append("some text"); builder.append("more text"); return builder.toString();