Exemplo n.º 1
0
 private static void equalizeLengths(StringBuilder sb1, StringBuilder sb2, StringBuilder sb3) {
   int maxLength = sb1.length();
   maxLength = Math.max(maxLength, sb2.length());
   maxLength = Math.max(maxLength, sb3.length());
   ensureLength(sb1, maxLength);
   ensureLength(sb2, maxLength);
   ensureLength(sb3, maxLength);
 }
Exemplo n.º 2
0
 private static void ensureLength(StringBuilder sb, int length) {
   while (sb.length() < length) {
     sb.append(' ');
   }
 }