Created
August 1, 2020 16:58
-
-
Save anishLearnsToCode/8d521d4016747dc81e0f654a7e07be7a to your computer and use it in GitHub Desktop.
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
import java.util.Scanner; | |
public class StringBuilderExample { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
StringBuilder builder = new StringBuilder(scanner.nextLine()); | |
builder.append(" hello world"); | |
System.out.println(builder.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment