[java] Create a string with n characters