Expandable String Java | StringBuilder OR StringBuffer | Java Tutorial

Published: 20 August 2020
on channel: Professor Saad
123
3

#ExpandableStringJava #StringBuilder #StringBuffer #JavaStringTutorial #JavaTutorial
Expandable String Java | String Builder or String Buffer
Like, Share, And Subscribe | Professor Saad Yousuf
Watch Our All Videos On This :    / professorsaad  
Subscribe Our Channel :    / professorsaad  
Playlists:    / ssby79  

Source CODE:
public class DemoString6 {

public static void main(String[] args) {
StringBuilder sentence = new StringBuilder(" is going to school ");
display(sentence);
sentence.insert(0, "Jeff");
display(sentence);
sentence.append("for supplies.");
display(sentence);
sentence.insert(5, "Carlos ");
display(sentence);
sentence.setLength(20);
display(sentence);

}
public static void display(StringBuilder msg) {
System.out.println(msg);
System.out.println("Length: " + msg.length());
System.out.println("Capacity: " + msg.capacity() + "\n");
}
}


On this page of the site you can watch the video online Expandable String Java | StringBuilder OR StringBuffer | Java Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Professor Saad 20 August 2020, share the link with friends and acquaintances, this video has already been watched 123 times on youtube and it was liked by 3 viewers. Enjoy your viewing!