code: public static String repeat(char c, int n) {
          char[] array = new char[n];
          Arrays.fill(array, c);
          return String.valueOf(array);
      }
docs: Creates a string consisting of n times the given character.
  
  @param c the char
  @param n the number of times to repeat
  @return the string