Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathListApp.java
More file actions
Latest commit
22 lines (18 loc) · 541 Bytes
/
Copy pathListApp.java
File metadata and controls
22 lines (18 loc) · 541 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
importjava.util.ArrayList;
importjava.util.LinkedList;
importjava.util.List;
publicclassListApp {
publicstaticvoidmain(String[] args) {
List<String> strings = newArrayList<>();
// List<String> strings1 = new LinkedList<>();
strings.add("Firman");
strings.add("Kurniawan");
strings.add("2");
strings.set(0, "TMJ");
strings.remove(2);
System.out.println(strings.get(1));
for (varvalue : strings){
System.out.println(value);
}
}
}