Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java StringBuilder

//StringBuilder in Java represents a mutable sequence of characters.

// Example(1) Create StringBuilder without Arguments

StringBuilder name = new StringBuilder();  // Create a StringBuilder object

// Example(2) Create StringBuilder with Arguments

StringBuilder name = new StringBuilder("Computer System");

// Example(3) Change from String Object to StringBuilder Object

String name = "jack"; // String Object 

StringBuilder name2 = new StringBuilder(name);  // add String Object  in StringBuilder Constructor 

System.out.println(name2); // print StringBuilder Object

System.out.println(name2.toString); // print String Object






 
PREVIOUS NEXT
Tagged: #Java #StringBuilder
ADD COMMENT
Topic
Name
9+5 =