import java.util.Arrays;

public class GenerateStringWithGivenLength
{
  public static String generateStringWithLength( int len, char fill )
  {
    if ( len < 0)
      return null;
  
    char[] cs = new char[ len ];
    Arrays.fill( cs, fill );
    return new String( cs );
  }
 
  public static void main( String[] args )
  {
    System.out.println( generateStringWithLength(4, '.') );
  }
}
