Converting a StringBuilder to String in Java

Converting a StringBuilder to String in Java - The toString() method of the StringBuilder class reruns String value of the current object. To convert a StringBuilder to String value simple invoke the toString() method on it.Instantiate the StringBuilder class.Append data to it using the append() me…