stringbuilder last character remove code example Example: how to delete last char from stringbuilder if(sb.length() > 0){ sb.deleteCharAt(sb.length() - 1); }