-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.java
More file actions
46 lines (32 loc) · 967 Bytes
/
test.java
File metadata and controls
46 lines (32 loc) · 967 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
42
43
44
45
46
package example.CallBackExample;
import java.util.ArrayList;
import java.util.List;
public class test {
public static String name = "george";
private static Integer age;
public static void main(String[] args) {
// System.out.println(aa());
// System.out.println("name: " + name);
String word = "Hello world.";
String name = "George, Amy, KK, Box";
System.out.println(word.replace(" ", ","));
String[] n = name.replace(",", "").split(" ");
List<String> n2 = new ArrayList<>();
for (String i : n) {
System.out.println(i);
n2.add(i);
}
for (int i=0; i<n2.size(); i++) {
System.out.println(n2.get(i));
}
}
public static int aa() {
// System.out.println("3");
System.out.println(bb());
return 2;
}
public static int bb() {
System.out.println("2");
return 3;
}
}