Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { /** * Internal methods to generate a string with a specified length * * @param l * String length * @return Generated string */ private static String generateFixedLengthString(int l) { StringBuilder buffer = new StringBuilder(); for (int i = 1; i <= l; i++) { buffer.append("X"); } return buffer.toString(); } }