Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A Java program to convert StringBuilder to String. Read How to convert StringBuilder to String i Java : coderolls.com/convert-stringbuilder-to-string-in-java
/**
* A Java program to convert StringBuilder to String
* @author Gaurav Kukade at cderlls.com
*
*/
public class StringBuilderToString {
public static void main(String[] args) {
StringBuilder stringBuilder = new StringBuilder("Hello ");
stringBuilder.append("Gaurav ")
.append("Kukade!");
System.out.println("Printing strinBuilder as String: \n");
System.out.println(stringBuilder.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.