-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathString007.java
More file actions
25 lines (19 loc) · 879 Bytes
/
Copy pathString007.java
File metadata and controls
25 lines (19 loc) · 879 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
package strings;
/**
* Created by WERT on 09.01.2017.
*/
public class String007 {
public static void main(String[] args) {
// примеры создания строк класса StringBuilder
StringBuilder strBld1 = new StringBuilder();
System.out.println("strBld1.length() = " + strBld1.length());
System.out.println("strBld1.capacity() = " + strBld1.capacity());
StringBuilder strBld2 = new StringBuilder(10);
System.out.println("\nstrBld2.length() = " + strBld2.length());
System.out.println("strBld2.capacity() = " + strBld2.capacity());
StringBuilder strBld3 = new StringBuilder("Hello");
System.out.println("\nstrBld3 = " + strBld3);
System.out.println("strBld3.length() = " + strBld3.length());
System.out.println("strBld3.capacity() = " + strBld3.capacity());
}
}