code: public static String repeatChars(final char ch, final int count) {
          return CharBuffer.allocate(count).toString().replace('\0', ch);
      }
docs: Creates a string which contains a sequence of repeated characters.
  
  @param ch to repeat
  @param count number of repetitions
  @return a string with {@code count} consisting only of {@code ch}