private static void appendIndentedNewLine ( int indentLevel , StringBuilder stringBuilder ) { stringBuilder . append ( "\n" ) ; for ( int i = 0 ; i < indentLevel ; i ++ ) { // Assuming indention using 2 spaces stringBuilder . append ( " " ) ; } }
Print a new line with indention at the beginning of the new line .