java remove last charcater from string builder code example Example: StringBuilder java pop back sb.setLength(sb.length() - 1);