Java Basic Go Back Methods of string builder class views 19:28 Now let us here discuss some methods which StringBuilder class has that String Class doesn’t. 1) Void setLength(int newLength):- This method helps set the length of the new character sequence. If the newLength is less than the Length() then the last characters of the character sequence get truncated and if it is greater than Length() , then the null characters get added to the character sequence. 2) Void ensureCapacity(int minCapacity):- This method makes it sure that the capacity of the String class is atleast what is specified in the method. Datatypes and Variables Types of Variables Defining the structure of java class Syntax to import package Working with Java Data types Object reference variable String builder class and contructor Methods of string builder class Using Operators and Decision Constructors Using Increment and Decrement Operators Using Right shift operators Using Parenthesis to override operator precendence