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 pathArrayApp.java
More file actions
Latest commit
15 lines (11 loc) · 406 Bytes
/
Copy pathArrayApp.java
File metadata and controls
15 lines (11 loc) · 406 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
importjava.util.Arrays;
importjava.util.List;
publicclassArrayApp {
publicstaticvoidmain(String[] args) {
List<String> names = List.of("Firma", "Kurniawan", "TMJ");
Object[] objects = names.toArray();
String[] strings = names.toArray(newString[]{});
System.out.println(Arrays.toString(objects));
System.out.println(Arrays.toString(strings));
}
}