-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment123_.java
More file actions
41 lines (27 loc) · 988 Bytes
/
Assignment123_.java
File metadata and controls
41 lines (27 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package abhilash_Asignments;
/*"StringBuffer
append, insert,replace,delete,
reverse,charAt,capacity,length,
substring(oneparameter),
substring
(oneparameter,
two parameter)
"*/
public class Assignment123_ {
public static void main(String[] args) {
StringBuffer B1 = new StringBuffer("Automation");
B1.append(" Testing "); // Append Method!
System.out.println("output AppendMethod:- " + B1);
B1.insert(0, " Wellcome "); // Insert Method!
System.out.println("OutPut InsertMethod:- " + B1);
B1.replace(0, 8, "Hii"); // Replace Method
System.out.println("Output ReplaceMethod:- " + B1);
// CharAT method
System.out.println("output CharAtMethod: - " + B1.charAt(5));
// Capacity
System.out.println("output Capacity: - " + B1.capacity());
System.out.println("output length Method: - " + B1.length());
System.out.println("SubString Method :-" + B1.substring(0));
System.out.println("SubString 2 parameters Method :-" + B1.substring(0, 10));
}
}