Here you can find the source of indent(int level, int spaces)
public static final String indent(int level, int spaces)
//package com.java2s; //License from project: Apache License public class Main { public static final String indent(int level) { return indent(level, 4); }// ww w . j a va 2s .com public static final String indent(int level, int spaces) { StringBuilder result = new StringBuilder(); for (int i = 0; i < level; i++) { for (int j = 0; j < spaces; j++) { result.append(" "); } } return result.toString(); } }