- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestArrays.java
More file actions
Latest commit
27 lines (22 loc) · 637 Bytes
/
Copy pathTestArrays.java
File metadata and controls
27 lines (22 loc) · 637 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
publicclassTestArrays {
publicstaticvoidmain(String[] args) {
int[] index = newint[4];
index[0] = 1;
index[1] = 3;
index[2] = 0;
index[3] = 2;
String[] islands = newString[4];
islands[0] = "Бермуды";
islands[1] = "Фиджи";
islands[2] = "Азорские острова";
islands[3] = "Косумель";
inty = 0;
intref;
while (y < 4) {
ref = index[y];
System.out.print("острова = ");
System.out.println(islands[ref]);
y = y + 1;
}
}
}