Java tutorial
//package com.java2s; public class Main { public static String indent(Integer position) { StringBuffer stringBuffer = new StringBuffer(); for (int i = 0; i < position; i++) { stringBuffer.append(" "); } return stringBuffer.toString(); } public static String indent(String position) { Integer posix = Integer.parseInt(position); return indent(posix); } }