-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppend.java
More file actions
35 lines (25 loc) · 800 Bytes
/
Copy pathAppend.java
File metadata and controls
35 lines (25 loc) · 800 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
//todAY we learn the string buffer concepts in java.
/* STRING BUFFER:-In Java, Java provides a class called StringBuffer to create and modify strings easily.
Definition
StringBuffer is a mutable class.
Mutable means:
1)The value can be changed after creation.
2)Memory is not created again and again like String.
USES OF STRING BUFFER:-
1)Faster
2)Memory efficient
3)Useful when strings change many times.
Important Methods of StringBuffer
1) APPEND()*/
class Append
{
public static void main(String args[])
{
StringBuffer sb = new StringBuffer("Java");
StringBuffer sb1=new StringBuffer("python");
sb.append(" Programming");
sb1.append(" programming");
System.out.println(sb);
System.out.println(sb1);
}
}