Check out example codes for "stringbuilder to string java". It will help you in understanding the concepts better.

Code Example 1

StringBuilder.toString();
//the text will be whatever information you gave in the constructor

Learn ReactJs, React Native from akashmittal.com