We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2ce2ff commit ac34ca3Copy full SHA for ac34ca3
SBDemo2.java
@@ -0,0 +1,12 @@
1
+// Demonstration of StringBuffer {delete, replace}
2
+
3
+class SBDemo2{
4
+ public static void main(String args[]){
5
+ StringBuffer sb1 = new StringBuffer("Yavatmal");
6
+ System.out.println("Delete some letters : " + sb1.delete(3,6)); // Yav _ _ _ al
7
8
+ StringBuffer sb2 = new StringBuffer("Hi Alice");
9
+ System.out.println("Replacing the message : " + sb2.replace(3,8,"Bob")); // Hi Bob
10
11
+ }
12
+}
0 commit comments