Last active
December 23, 2020 18:33
-
-
Save gauravkukade/00bd416bcb2ca1c72dbcd600d48e2f78 to your computer and use it in GitHub Desktop.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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