Here you can find the source of indent(int numSpaces)
Parameter | Description |
---|---|
numSpaces | the number of spaces to use for the indentation; |
public static String indent(int numSpaces)
//package com.java2s; public class Main { /**// w w w .j a va 2 s .co m * @return a string of blank spaces of the specified length. * <br/><br/> * @param numSpaces the number of spaces to use for the indentation; */ public static String indent(int numSpaces) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < numSpaces; ++i) buffer.append(" "); return buffer.toString(); } }