Advertisement
Georgi_Benchev

Untitled

Nov 5th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. public String printComments() {
  2.         StringBuilder output = new StringBuilder();
  3.         output.append("--COMMENTS--");
  4.  
  5.         for (Comment comment : comments) {
  6.             output.append(comment.toString());
  7.         }
  8.  
  9.         output.append("\n");
  10.         output.append("--COMMENTS--");
  11.  
  12.         return output.toString();
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement