StringBuilder Java Setlength
StringBuilder str = new StringBuilder("123456");
// set length equal to 5
str.setLength(5);// str contains "12345"
Black Batfish
StringBuilder str = new StringBuilder("123456");
// set length equal to 5
str.setLength(5);// str contains "12345"