forked from natural/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArray2.java
More file actions
27 lines (23 loc) · 662 Bytes
/
Array2.java
File metadata and controls
27 lines (23 loc) · 662 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
public class Array2 {
public static void main(String[] args) {
Integer b[] = {4, 5, 6};
System.out.println(b[0].toString());
System.out.println(b[1].toString());
System.out.println(b[2].toString());
int c[] = {1,2,3};
System.out.println(c[0]);
System.out.println(c[1]);
System.out.println(c[2]);
String d[] = {"a", "s", "d", "f"};
System.out.println(d[0]);
System.out.println(d[1]);
System.out.println(d[2]);
System.out.println(d[3]);
String[] e;
e = new String[2];
e[0] = "4";
e[1] = "2";
System.out.println(e[0]);
System.out.println(e[1]);
}
}